;--- include file created by h2incx v0.99.17, copyright 2005-2006 japheth
;--- source file: D:\MICROS~1\INCLUDE\wincrypt.h, last modified: 7/9/2001 0:35
;--- cmdline used for creation:  -i -d3 -o ASM2 wintrust.h

ifndef __WINCRYPT_H__
__WINCRYPT_H__	EQU	<>
ifndef defined
defined macro x
ifdef x
  exitm <-1>
else
  exitm <0>
endif
endm
endif
if defined(_MSC_VER)
if (_MSC_VER ge 800)
if _MSC_VER ge 1200
;#pragma warning ( push ) 
endif 
;#pragma warning ( disable : 4201 ) 
endif 
if (_MSC_VER gt 1020)
;#pragma once 
endif 
endif 
ifdef __cplusplus
;extern "C"
;{
endif 
ifndef _HRESULT_DEFINED
_HRESULT_DEFINED	EQU	<>
HRESULT typedef SDWORD
endif 
ifndef WINADVAPI
WINADVAPI	EQU	<>
endif 
ifndef WINAPI
WINAPI	EQU	<__stdcall>
endif 
ifndef CALLBACK
CALLBACK	EQU	<__stdcall>
endif 
ifndef DECLSPEC_IMPORT
DECLSPEC_IMPORT	EQU	<>
endif 
if 0;ndef CONST
CONST	EQU	<const>
endif 
if 0;ifndef IN
;IN	EQU	<>
endif 
if 0;ifndef OUT
;OUT	EQU	<>
endif 
ifndef OPTIONAL
OPTIONAL	EQU	<>
endif 
if  0 eq defined(_CRYPT32_)
WINCRYPT32API	EQU	<DECLSPEC_IMPORT>
else 
WINCRYPT32API	EQU	<>
endif 
if  0 eq defined(_CRYPT32STRING_)
WINCRYPT32STRINGAPI	EQU	<WINCRYPT32API>
else 
WINCRYPT32STRINGAPI	EQU	<>
endif 
GET_ALG_CLASS macro x
	exitm <( x  and  ( 7  shl  13 ) ) >
	endm
GET_ALG_TYPE macro x
	exitm <( x  and  ( 15  shl  9 ) ) >
	endm
GET_ALG_SID macro x
	exitm <( x  and  511 ) >
	endm
ALG_CLASS_ANY	EQU	0
ALG_CLASS_SIGNATURE	EQU	( 1  shl  13 )
ALG_CLASS_MSG_ENCRYPT	EQU	( 2  shl  13 )
ALG_CLASS_DATA_ENCRYPT	EQU	( 3  shl  13 )
ALG_CLASS_HASH	EQU	( 4  shl  13 )
ALG_CLASS_KEY_EXCHANGE	EQU	( 5  shl  13 )
ALG_CLASS_ALL	EQU	( 7  shl  13 )
ALG_TYPE_ANY	EQU	0
ALG_TYPE_DSS	EQU	( 1  shl  9 )
ALG_TYPE_RSA	EQU	( 2  shl  9 )
ALG_TYPE_BLOCK	EQU	( 3  shl  9 )
ALG_TYPE_STREAM	EQU	( 4  shl  9 )
ALG_TYPE_DH	EQU	( 5  shl  9 )
ALG_TYPE_SECURECHANNEL	EQU	( 6  shl  9 )
ALG_SID_ANY	EQU	0
ALG_SID_RSA_ANY	EQU	0
ALG_SID_RSA_PKCS	EQU	1
ALG_SID_RSA_MSATWORK	EQU	2
ALG_SID_RSA_ENTRUST	EQU	3
ALG_SID_RSA_PGP	EQU	4
ALG_SID_DSS_ANY	EQU	0
ALG_SID_DSS_PKCS	EQU	1
ALG_SID_DSS_DMS	EQU	2
ALG_SID_DES	EQU	1
ALG_SID_3DES	EQU	3
ALG_SID_DESX	EQU	4
ALG_SID_IDEA	EQU	5
ALG_SID_CAST	EQU	6
ALG_SID_SAFERSK64	EQU	7
ALG_SID_SAFERSK128	EQU	8
ALG_SID_3DES_112	EQU	9
ALG_SID_CYLINK_MEK	EQU	12
ALG_SID_RC5	EQU	13
ALG_SID_AES_128	EQU	14
ALG_SID_AES_192	EQU	15
ALG_SID_AES_256	EQU	16
ALG_SID_AES	EQU	17
ALG_SID_SKIPJACK	EQU	10
ALG_SID_TEK	EQU	11
CRYPT_MODE_CBCI	EQU	6
CRYPT_MODE_CFBP	EQU	7
CRYPT_MODE_OFBP	EQU	8
CRYPT_MODE_CBCOFM	EQU	9
CRYPT_MODE_CBCOFMI	EQU	10
ALG_SID_RC2	EQU	2
ALG_SID_RC4	EQU	1
ALG_SID_SEAL	EQU	2
ALG_SID_DH_SANDF	EQU	1
ALG_SID_DH_EPHEM	EQU	2
ALG_SID_AGREED_KEY_ANY	EQU	3
ALG_SID_KEA	EQU	4
ALG_SID_MD2	EQU	1
ALG_SID_MD4	EQU	2
ALG_SID_MD5	EQU	3
ALG_SID_SHA	EQU	4
ALG_SID_SHA1	EQU	4
ALG_SID_MAC	EQU	5
ALG_SID_RIPEMD	EQU	6
ALG_SID_RIPEMD160	EQU	7
ALG_SID_SSL3SHAMD5	EQU	8
ALG_SID_HMAC	EQU	9
ALG_SID_TLS1PRF	EQU	10
ALG_SID_HASH_REPLACE_OWF	EQU	11
ALG_SID_SSL3_MASTER	EQU	1
ALG_SID_SCHANNEL_MASTER_HASH	EQU	2
ALG_SID_SCHANNEL_MAC_KEY	EQU	3
ALG_SID_PCT1_MASTER	EQU	4
ALG_SID_SSL2_MASTER	EQU	5
ALG_SID_TLS1_MASTER	EQU	6
ALG_SID_SCHANNEL_ENC_KEY	EQU	7
ALG_SID_EXAMPLE	EQU	80
ifndef ALGIDDEF
ALGIDDEF	EQU	<>
ALG_ID typedef DWORD
endif 
CALG_MD2	EQU	( ALG_CLASS_HASH  or  ALG_TYPE_ANY  or  ALG_SID_MD2 )
CALG_MD4	EQU	( ALG_CLASS_HASH  or  ALG_TYPE_ANY  or  ALG_SID_MD4 )
CALG_MD5	EQU	( ALG_CLASS_HASH  or  ALG_TYPE_ANY  or  ALG_SID_MD5 )
CALG_SHA	EQU	( ALG_CLASS_HASH  or  ALG_TYPE_ANY  or  ALG_SID_SHA )
CALG_SHA1	EQU	( ALG_CLASS_HASH  or  ALG_TYPE_ANY  or  ALG_SID_SHA1 )
CALG_MAC	EQU	( ALG_CLASS_HASH  or  ALG_TYPE_ANY  or  ALG_SID_MAC )
CALG_RSA_SIGN	EQU	( ALG_CLASS_SIGNATURE  or  ALG_TYPE_RSA  or  ALG_SID_RSA_ANY )
CALG_DSS_SIGN	EQU	( ALG_CLASS_SIGNATURE  or  ALG_TYPE_DSS  or  ALG_SID_DSS_ANY )
CALG_NO_SIGN	EQU	( ALG_CLASS_SIGNATURE  or  ALG_TYPE_ANY  or  ALG_SID_ANY )
CALG_RSA_KEYX	EQU	( ALG_CLASS_KEY_EXCHANGE  or  ALG_TYPE_RSA  or  ALG_SID_RSA_ANY )
CALG_DES	EQU	( ALG_CLASS_DATA_ENCRYPT  or  ALG_TYPE_BLOCK  or  ALG_SID_DES )
CALG_3DES_112	EQU	( ALG_CLASS_DATA_ENCRYPT  or  ALG_TYPE_BLOCK  or  ALG_SID_3DES_112 )
CALG_3DES	EQU	( ALG_CLASS_DATA_ENCRYPT  or  ALG_TYPE_BLOCK  or  ALG_SID_3DES )
CALG_DESX	EQU	( ALG_CLASS_DATA_ENCRYPT  or  ALG_TYPE_BLOCK  or  ALG_SID_DESX )
CALG_RC2	EQU	( ALG_CLASS_DATA_ENCRYPT  or  ALG_TYPE_BLOCK  or  ALG_SID_RC2 )
CALG_RC4	EQU	( ALG_CLASS_DATA_ENCRYPT  or  ALG_TYPE_STREAM  or  ALG_SID_RC4 )
CALG_SEAL	EQU	( ALG_CLASS_DATA_ENCRYPT  or  ALG_TYPE_STREAM  or  ALG_SID_SEAL )
CALG_DH_SF	EQU	( ALG_CLASS_KEY_EXCHANGE  or  ALG_TYPE_DH  or  ALG_SID_DH_SANDF )
CALG_DH_EPHEM	EQU	( ALG_CLASS_KEY_EXCHANGE  or  ALG_TYPE_DH  or  ALG_SID_DH_EPHEM )
CALG_AGREEDKEY_ANY	EQU	( ALG_CLASS_KEY_EXCHANGE  or  ALG_TYPE_DH  or  ALG_SID_AGREED_KEY_ANY )
CALG_KEA_KEYX	EQU	( ALG_CLASS_KEY_EXCHANGE  or  ALG_TYPE_DH  or  ALG_SID_KEA )
CALG_HUGHES_MD5	EQU	( ALG_CLASS_KEY_EXCHANGE  or  ALG_TYPE_ANY  or  ALG_SID_MD5 )
CALG_SKIPJACK	EQU	( ALG_CLASS_DATA_ENCRYPT  or  ALG_TYPE_BLOCK  or  ALG_SID_SKIPJACK )
CALG_TEK	EQU	( ALG_CLASS_DATA_ENCRYPT  or  ALG_TYPE_BLOCK  or  ALG_SID_TEK )
CALG_CYLINK_MEK	EQU	( ALG_CLASS_DATA_ENCRYPT  or  ALG_TYPE_BLOCK  or  ALG_SID_CYLINK_MEK )
CALG_SSL3_SHAMD5	EQU	( ALG_CLASS_HASH  or  ALG_TYPE_ANY  or  ALG_SID_SSL3SHAMD5 )
CALG_SSL3_MASTER	EQU	( ALG_CLASS_MSG_ENCRYPT  or  ALG_TYPE_SECURECHANNEL  or  ALG_SID_SSL3_MASTER )
CALG_SCHANNEL_MASTER_HASH	EQU	( ALG_CLASS_MSG_ENCRYPT  or  ALG_TYPE_SECURECHANNEL  or  ALG_SID_SCHANNEL_MASTER_HASH )
CALG_SCHANNEL_MAC_KEY	EQU	( ALG_CLASS_MSG_ENCRYPT  or  ALG_TYPE_SECURECHANNEL  or  ALG_SID_SCHANNEL_MAC_KEY )
CALG_SCHANNEL_ENC_KEY	EQU	( ALG_CLASS_MSG_ENCRYPT  or  ALG_TYPE_SECURECHANNEL  or  ALG_SID_SCHANNEL_ENC_KEY )
CALG_PCT1_MASTER	EQU	( ALG_CLASS_MSG_ENCRYPT  or  ALG_TYPE_SECURECHANNEL  or  ALG_SID_PCT1_MASTER )
CALG_SSL2_MASTER	EQU	( ALG_CLASS_MSG_ENCRYPT  or  ALG_TYPE_SECURECHANNEL  or  ALG_SID_SSL2_MASTER )
CALG_TLS1_MASTER	EQU	( ALG_CLASS_MSG_ENCRYPT  or  ALG_TYPE_SECURECHANNEL  or  ALG_SID_TLS1_MASTER )
CALG_RC5	EQU	( ALG_CLASS_DATA_ENCRYPT  or  ALG_TYPE_BLOCK  or  ALG_SID_RC5 )
CALG_HMAC	EQU	( ALG_CLASS_HASH  or  ALG_TYPE_ANY  or  ALG_SID_HMAC )
CALG_TLS1PRF	EQU	( ALG_CLASS_HASH  or  ALG_TYPE_ANY  or  ALG_SID_TLS1PRF )
CALG_HASH_REPLACE_OWF	EQU	( ALG_CLASS_HASH  or  ALG_TYPE_ANY  or  ALG_SID_HASH_REPLACE_OWF )
CALG_AES_128	EQU	( ALG_CLASS_DATA_ENCRYPT  or  ALG_TYPE_BLOCK  or  ALG_SID_AES_128 )
CALG_AES_192	EQU	( ALG_CLASS_DATA_ENCRYPT  or  ALG_TYPE_BLOCK  or  ALG_SID_AES_192 )
CALG_AES_256	EQU	( ALG_CLASS_DATA_ENCRYPT  or  ALG_TYPE_BLOCK  or  ALG_SID_AES_256 )
CALG_AES	EQU	( ALG_CLASS_DATA_ENCRYPT  or  ALG_TYPE_BLOCK  or  ALG_SID_AES )
HCRYPTPROV typedef ULONG_PTR
HCRYPTKEY typedef ULONG_PTR
HCRYPTHASH typedef ULONG_PTR
CRYPT_VERIFYCONTEXT	EQU	0F0000000h
CRYPT_NEWKEYSET	EQU	00000008h
CRYPT_DELETEKEYSET	EQU	00000010h
CRYPT_MACHINE_KEYSET	EQU	00000020h
CRYPT_SILENT	EQU	00000040h
CRYPT_EXPORTABLE	EQU	00000001h
CRYPT_USER_PROTECTED	EQU	00000002h
CRYPT_CREATE_SALT	EQU	00000004h
CRYPT_UPDATE_KEY	EQU	00000008h
CRYPT_NO_SALT	EQU	00000010h
CRYPT_PREGEN	EQU	00000040h
CRYPT_RECIPIENT	EQU	00000010h
CRYPT_INITIATOR	EQU	00000040h
CRYPT_ONLINE	EQU	00000080h
CRYPT_SF	EQU	00000100h
CRYPT_CREATE_IV	EQU	00000200h
CRYPT_KEK	EQU	00000400h
CRYPT_DATA_KEY	EQU	00000800h
CRYPT_VOLATILE	EQU	00001000h
CRYPT_SGCKEY	EQU	00002000h
CRYPT_ARCHIVABLE	EQU	00004000h
RSA1024BIT_KEY	EQU	04000000h
CRYPT_SERVER	EQU	00000400h
KEY_LENGTH_MASK	EQU	0FFFF0000h
CRYPT_Y_ONLY	EQU	00000001h
CRYPT_SSL2_FALLBACK	EQU	00000002h
CRYPT_DESTROYKEY	EQU	00000004h
CRYPT_OAEP	EQU	00000040h
CRYPT_BLOB_VER3	EQU	00000080h
CRYPT_IPSEC_HMAC_KEY	EQU	00000100h
CRYPT_SECRETDIGEST	EQU	00000001h
CRYPT_OWF_REPL_LM_HASH	EQU	00000001h
CRYPT_LITTLE_ENDIAN	EQU	00000001h
CRYPT_NOHASHOID	EQU	00000001h
CRYPT_TYPE2_FORMAT	EQU	00000002h
CRYPT_X931_FORMAT	EQU	00000004h
CRYPT_MACHINE_DEFAULT	EQU	00000001h
CRYPT_USER_DEFAULT	EQU	00000002h
CRYPT_DELETE_DEFAULT	EQU	00000004h
SIMPLEBLOB	EQU	1h
PUBLICKEYBLOB	EQU	6h
PRIVATEKEYBLOB	EQU	7h
PLAINTEXTKEYBLOB	EQU	8h
OPAQUEKEYBLOB	EQU	9h
PUBLICKEYBLOBEX	EQU	0Ah
SYMMETRICWRAPKEYBLOB	EQU	0Bh
AT_KEYEXCHANGE	EQU	1
AT_SIGNATURE	EQU	2
CRYPT_USERDATA	EQU	1
KP_IV	EQU	1
KP_SALT	EQU	2
KP_PADDING	EQU	3
KP_MODE	EQU	4
KP_MODE_BITS	EQU	5
KP_PERMISSIONS	EQU	6
KP_ALGID	EQU	7
KP_BLOCKLEN	EQU	8
KP_KEYLEN	EQU	9
KP_SALT_EX	EQU	10
KP_P	EQU	11
KP_G	EQU	12
KP_Q	EQU	13
KP_X	EQU	14
KP_Y	EQU	15
KP_RA	EQU	16
KP_RB	EQU	17
KP_INFO	EQU	18
KP_EFFECTIVE_KEYLEN	EQU	19
KP_SCHANNEL_ALG	EQU	20
KP_CLIENT_RANDOM	EQU	21
KP_SERVER_RANDOM	EQU	22
KP_RP	EQU	23
KP_PRECOMP_MD5	EQU	24
KP_PRECOMP_SHA	EQU	25
KP_CERTIFICATE	EQU	26
KP_CLEAR_KEY	EQU	27
KP_PUB_EX_LEN	EQU	28
KP_PUB_EX_VAL	EQU	29
KP_KEYVAL	EQU	30
KP_ADMIN_PIN	EQU	31
KP_KEYEXCHANGE_PIN	EQU	32
KP_SIGNATURE_PIN	EQU	33
KP_PREHASH	EQU	34
KP_OAEP_PARAMS	EQU	36
KP_CMS_KEY_INFO	EQU	37
KP_CMS_DH_KEY_INFO	EQU	38
KP_PUB_PARAMS	EQU	39
KP_VERIFY_PARAMS	EQU	40
KP_HIGHEST_VERSION	EQU	41
PKCS5_PADDING	EQU	1
RANDOM_PADDING	EQU	2
ZERO_PADDING	EQU	3
CRYPT_MODE_CBC	EQU	1
CRYPT_MODE_ECB	EQU	2
CRYPT_MODE_OFB	EQU	3
CRYPT_MODE_CFB	EQU	4
CRYPT_MODE_CTS	EQU	5
CRYPT_ENCRYPT	EQU	0001h
CRYPT_DECRYPT	EQU	0002h
CRYPT_EXPORT	EQU	0004h
CRYPT_READ	EQU	0008h
CRYPT_WRITE	EQU	0010h
CRYPT_MAC	EQU	0020h
CRYPT_EXPORT_KEY	EQU	0040h
CRYPT_IMPORT_KEY	EQU	0080h
CRYPT_ARCHIVE	EQU	0100h
HP_ALGID	EQU	0001h
HP_HASHVAL	EQU	0002h
HP_HASHSIZE	EQU	0004h
HP_HMAC_INFO	EQU	0005h
HP_TLS1PRF_LABEL	EQU	0006h
HP_TLS1PRF_SEED	EQU	0007h
CRYPT_FAILED	EQU	<FALSE>
CRYPT_SUCCEED	EQU	<TRUE>
RCRYPT_SUCCEEDED macro rt
	exitm <( ( rt ) == CRYPT_SUCCEED ) >
	endm
RCRYPT_FAILED macro rt
	exitm <( ( rt ) == CRYPT_FAILED ) >
	endm
PP_ENUMALGS	EQU	1
PP_ENUMCONTAINERS	EQU	2
PP_IMPTYPE	EQU	3
PP_NAME	EQU	4
PP_VERSION	EQU	5
PP_CONTAINER	EQU	6
PP_CHANGE_PASSWORD	EQU	7
PP_KEYSET_SEC_DESCR	EQU	8
PP_CERTCHAIN	EQU	9
PP_KEY_TYPE_SUBTYPE	EQU	10
PP_PROVTYPE	EQU	16
PP_KEYSTORAGE	EQU	17
PP_APPLI_CERT	EQU	18
PP_SYM_KEYSIZE	EQU	19
PP_SESSION_KEYSIZE	EQU	20
PP_UI_PROMPT	EQU	21
PP_ENUMALGS_EX	EQU	22
PP_ENUMMANDROOTS	EQU	25
PP_ENUMELECTROOTS	EQU	26
PP_KEYSET_TYPE	EQU	27
PP_ADMIN_PIN	EQU	31
PP_KEYEXCHANGE_PIN	EQU	32
PP_SIGNATURE_PIN	EQU	33
PP_SIG_KEYSIZE_INC	EQU	34
PP_KEYX_KEYSIZE_INC	EQU	35
PP_UNIQUE_CONTAINER	EQU	36
PP_SGC_INFO	EQU	37
PP_USE_HARDWARE_RNG	EQU	38
PP_KEYSPEC	EQU	39
PP_ENUMEX_SIGNING_PROT	EQU	40
CRYPT_FIRST	EQU	1
CRYPT_NEXT	EQU	2
CRYPT_SGC_ENUM	EQU	4
CRYPT_IMPL_HARDWARE	EQU	1
CRYPT_IMPL_SOFTWARE	EQU	2
CRYPT_IMPL_MIXED	EQU	3
CRYPT_IMPL_UNKNOWN	EQU	4
CRYPT_IMPL_REMOVABLE	EQU	8
CRYPT_SEC_DESCR	EQU	00000001h
CRYPT_PSTORE	EQU	00000002h
CRYPT_UI_PROMPT	EQU	00000004h
CRYPT_FLAG_PCT1	EQU	0001h
CRYPT_FLAG_SSL2	EQU	0002h
CRYPT_FLAG_SSL3	EQU	0004h
CRYPT_FLAG_TLS1	EQU	0008h
CRYPT_FLAG_IPSEC	EQU	0010h
CRYPT_FLAG_SIGNING	EQU	0020h
CRYPT_SGC	EQU	0001h
CRYPT_FASTSGC	EQU	0002h
PP_CLIENT_HWND	EQU	1
PP_CONTEXT_INFO	EQU	11
PP_KEYEXCHANGE_KEYSIZE	EQU	12
PP_SIGNATURE_KEYSIZE	EQU	13
PP_KEYEXCHANGE_ALG	EQU	14
PP_SIGNATURE_ALG	EQU	15
PP_DELETEKEY	EQU	24
PROV_RSA_FULL	EQU	1
PROV_RSA_SIG	EQU	2
PROV_DSS	EQU	3
PROV_FORTEZZA	EQU	4
PROV_MS_EXCHANGE	EQU	5
PROV_SSL	EQU	6
PROV_RSA_SCHANNEL	EQU	12
PROV_DSS_DH	EQU	13
PROV_EC_ECDSA_SIG	EQU	14
PROV_EC_ECNRA_SIG	EQU	15
PROV_EC_ECDSA_FULL	EQU	16
PROV_EC_ECNRA_FULL	EQU	17
PROV_DH_SCHANNEL	EQU	18
PROV_SPYRUS_LYNKS	EQU	20
PROV_RNG	EQU	21
PROV_INTEL_SEC	EQU	22
PROV_REPLACE_OWF	EQU	23
PROV_RSA_AES	EQU	24
PROV_STT_MER	EQU	7
PROV_STT_ACQ	EQU	8
PROV_STT_BRND	EQU	9
PROV_STT_ROOT	EQU	10
PROV_STT_ISS	EQU	11
MS_DEF_PROV_A	EQU	<"Microsoft Base Cryptographic Provider v1.0">
MS_DEF_PROV_W	EQU	<L("Microsoft Base Cryptographic Provider v1.0")>
ifdef UNICODE
MS_DEF_PROV	EQU	<MS_DEF_PROV_W>
else 
MS_DEF_PROV	EQU	<MS_DEF_PROV_A>
endif 
MS_ENHANCED_PROV_A	EQU	<"Microsoft Enhanced Cryptographic Provider v1.0">
MS_ENHANCED_PROV_W	EQU	<L("Microsoft Enhanced Cryptographic Provider v1.0")>
ifdef UNICODE
MS_ENHANCED_PROV	EQU	<MS_ENHANCED_PROV_W>
else 
MS_ENHANCED_PROV	EQU	<MS_ENHANCED_PROV_A>
endif 
MS_STRONG_PROV_A	EQU	<"Microsoft Strong Cryptographic Provider">
MS_STRONG_PROV_W	EQU	<L("Microsoft Strong Cryptographic Provider")>
ifdef UNICODE
MS_STRONG_PROV	EQU	<MS_STRONG_PROV_W>
else 
MS_STRONG_PROV	EQU	<MS_STRONG_PROV_A>
endif 
MS_DEF_RSA_SIG_PROV_A	EQU	<"Microsoft RSA Signature Cryptographic Provider">
MS_DEF_RSA_SIG_PROV_W	EQU	<L("Microsoft RSA Signature Cryptographic Provider")>
ifdef UNICODE
MS_DEF_RSA_SIG_PROV	EQU	<MS_DEF_RSA_SIG_PROV_W>
else 
MS_DEF_RSA_SIG_PROV	EQU	<MS_DEF_RSA_SIG_PROV_A>
endif 
MS_DEF_RSA_SCHANNEL_PROV_A	EQU	<"Microsoft RSA SChannel Cryptographic Provider">
MS_DEF_RSA_SCHANNEL_PROV_W	EQU	<L("Microsoft RSA SChannel Cryptographic Provider")>
ifdef UNICODE
MS_DEF_RSA_SCHANNEL_PROV	EQU	<MS_DEF_RSA_SCHANNEL_PROV_W>
else 
MS_DEF_RSA_SCHANNEL_PROV	EQU	<MS_DEF_RSA_SCHANNEL_PROV_A>
endif 
MS_DEF_DSS_PROV_A	EQU	<"Microsoft Base DSS Cryptographic Provider">
MS_DEF_DSS_PROV_W	EQU	<L("Microsoft Base DSS Cryptographic Provider")>
ifdef UNICODE
MS_DEF_DSS_PROV	EQU	<MS_DEF_DSS_PROV_W>
else 
MS_DEF_DSS_PROV	EQU	<MS_DEF_DSS_PROV_A>
endif 
MS_DEF_DSS_DH_PROV_A	EQU	<"Microsoft Base DSS and Diffie-Hellman Cryptographic Provider">
MS_DEF_DSS_DH_PROV_W	EQU	<L("Microsoft Base DSS and Diffie-Hellman Cryptographic Provider")>
ifdef UNICODE
MS_DEF_DSS_DH_PROV	EQU	<MS_DEF_DSS_DH_PROV_W>
else 
MS_DEF_DSS_DH_PROV	EQU	<MS_DEF_DSS_DH_PROV_A>
endif 
MS_ENH_DSS_DH_PROV_A	EQU	<"Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider">
MS_ENH_DSS_DH_PROV_W	EQU	<L("Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider")>
ifdef UNICODE
MS_ENH_DSS_DH_PROV	EQU	<MS_ENH_DSS_DH_PROV_W>
else 
MS_ENH_DSS_DH_PROV	EQU	<MS_ENH_DSS_DH_PROV_A>
endif 
MS_DEF_DH_SCHANNEL_PROV_A	EQU	<"Microsoft DH SChannel Cryptographic Provider">
MS_DEF_DH_SCHANNEL_PROV_W	EQU	<L("Microsoft DH SChannel Cryptographic Provider")>
ifdef UNICODE
MS_DEF_DH_SCHANNEL_PROV	EQU	<MS_DEF_DH_SCHANNEL_PROV_W>
else 
MS_DEF_DH_SCHANNEL_PROV	EQU	<MS_DEF_DH_SCHANNEL_PROV_A>
endif 
MS_SCARD_PROV_A	EQU	<"Microsoft Base Smart Card Crypto Provider">
MS_SCARD_PROV_W	EQU	<L("Microsoft Base Smart Card Crypto Provider")>
ifdef UNICODE
MS_SCARD_PROV	EQU	<MS_SCARD_PROV_W>
else 
MS_SCARD_PROV	EQU	<MS_SCARD_PROV_A>
endif 
MS_ENH_RSA_AES_PROV_A	EQU	<"Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)">
MS_ENH_RSA_AES_PROV_W	EQU	<L("Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)")>
ifdef UNICODE
MS_ENH_RSA_AES_PROV	EQU	<MS_ENH_RSA_AES_PROV_W>
else 
MS_ENH_RSA_AES_PROV	EQU	<MS_ENH_RSA_AES_PROV_A>
endif 
MAXUIDLEN	EQU	64
EXPO_OFFLOAD_REG_VALUE	EQU	<"ExpoOffload">
EXPO_OFFLOAD_FUNC_NAME	EQU	<"OffloadModExpo">
CUR_BLOB_VERSION	EQU	2
CMS_KEY_INFO	struct 
dwVersion	DWORD	?
Algid	ALG_ID	?
pbOID	DWORD	?
cbOID	DWORD	?
CMS_KEY_INFO	ends

PCMS_KEY_INFO typedef ptr CMS_KEY_INFO

HMAC_INFO	struct 
HashAlgid	ALG_ID	?
pbInnerString	DWORD	?
cbInnerString	DWORD	?
pbOuterString	DWORD	?
cbOuterString	DWORD	?
HMAC_INFO	ends

PHMAC_INFO typedef ptr HMAC_INFO

SCHANNEL_ALG	struct 
dwUse	DWORD	?
Algid	ALG_ID	?
cBits	DWORD	?
dwFlags	DWORD	?
dwReserved	DWORD	?
SCHANNEL_ALG	ends

PSCHANNEL_ALG typedef ptr SCHANNEL_ALG

SCHANNEL_MAC_KEY	EQU	00000000h
SCHANNEL_ENC_KEY	EQU	00000001h
INTERNATIONAL_USAGE	EQU	00000001h
PROV_ENUMALGS	struct 
aiAlgid	ALG_ID	?
dwBitLen	DWORD	?
dwNameLen	DWORD	?
szName	CHAR 20 dup (?)
PROV_ENUMALGS	ends

PROV_ENUMALGS_EX	struct 
aiAlgid	ALG_ID	?
dwDefaultLen	DWORD	?
dwMinLen	DWORD	?
dwMaxLen	DWORD	?
dwProtocols	DWORD	?
dwNameLen	DWORD	?
szName	CHAR 20 dup (?)
dwLongNameLen	DWORD	?
szLongName	CHAR 40 dup (?)
PROV_ENUMALGS_EX	ends

BLOBHEADER	struct 
bType	BYTE	?
bVersion	BYTE	?
reserved	WORD	?
aiKeyAlg	ALG_ID	?
BLOBHEADER	ends

PUBLICKEYSTRUC typedef BLOBHEADER

RSAPUBKEY	struct 
magic	DWORD	?
bitlen	DWORD	?
pubexp	DWORD	?
RSAPUBKEY	ends

DHPUBKEY	struct 
magic	DWORD	?
bitlen	DWORD	?
DHPUBKEY	ends

DSSPUBKEY typedef DHPUBKEY
KEAPUBKEY typedef DHPUBKEY
TEKPUBKEY typedef DHPUBKEY

DSSSEED	struct 
counter	DWORD	?
seed	BYTE 20 dup (?)
DSSSEED	ends

DHPUBKEY_VER3	struct 
magic	DWORD	?
bitlenP	DWORD	?
bitlenQ	DWORD	?
bitlenJ	DWORD	?
DSSSeed	DSSSEED	<>
DHPUBKEY_VER3	ends

DSSPUBKEY_VER3 typedef DHPUBKEY_VER3

DHPRIVKEY_VER3	struct 
magic	DWORD	?
bitlenP	DWORD	?
bitlenQ	DWORD	?
bitlenJ	DWORD	?
bitlenX	DWORD	?
DSSSeed	DSSSEED	<>
DHPRIVKEY_VER3	ends

DSSPRIVKEY_VER3 typedef DHPRIVKEY_VER3

KEY_TYPE_SUBTYPE	struct 
dwKeySpec	DWORD	?
Type__	GUID	<>
Subtype	GUID	<>
KEY_TYPE_SUBTYPE	ends

PKEY_TYPE_SUBTYPE typedef ptr KEY_TYPE_SUBTYPE

CERT_FORTEZZA_DATA_PROP	struct 
SerialNumber	BYTE 8 dup (?)
CertIndex	DWORD	?
CertLabel	BYTE 36 dup (?)
CERT_FORTEZZA_DATA_PROP	ends

CRYPT_INTEGER_BLOB	struct 
cbData	DWORD	?
pbData	DWORD	?
CRYPT_INTEGER_BLOB	ends

PCRYPT_INTEGER_BLOB typedef ptr CRYPT_INTEGER_BLOB
CRYPT_UINT_BLOB typedef CRYPT_INTEGER_BLOB
PCRYPT_UINT_BLOB typedef ptr CRYPT_INTEGER_BLOB
CRYPT_OBJID_BLOB typedef CRYPT_INTEGER_BLOB
PCRYPT_OBJID_BLOB typedef ptr CRYPT_INTEGER_BLOB
CERT_NAME_BLOB typedef CRYPT_INTEGER_BLOB
PCERT_NAME_BLOB typedef ptr CRYPT_INTEGER_BLOB
CERT_RDN_VALUE_BLOB typedef CRYPT_INTEGER_BLOB
PCERT_RDN_VALUE_BLOB typedef ptr CRYPT_INTEGER_BLOB
CERT_BLOB typedef CRYPT_INTEGER_BLOB
PCERT_BLOB typedef ptr CRYPT_INTEGER_BLOB
CRL_BLOB typedef CRYPT_INTEGER_BLOB
PCRL_BLOB typedef ptr CRYPT_INTEGER_BLOB
DATA_BLOB typedef CRYPT_INTEGER_BLOB
PDATA_BLOB typedef ptr CRYPT_INTEGER_BLOB
CRYPT_DATA_BLOB typedef CRYPT_INTEGER_BLOB
PCRYPT_DATA_BLOB typedef ptr CRYPT_INTEGER_BLOB
CRYPT_HASH_BLOB typedef CRYPT_INTEGER_BLOB
PCRYPT_HASH_BLOB typedef ptr CRYPT_INTEGER_BLOB
CRYPT_DIGEST_BLOB typedef CRYPT_INTEGER_BLOB
PCRYPT_DIGEST_BLOB typedef ptr CRYPT_INTEGER_BLOB
CRYPT_DER_BLOB typedef CRYPT_INTEGER_BLOB
PCRYPT_DER_BLOB typedef ptr CRYPT_INTEGER_BLOB
CRYPT_ATTR_BLOB typedef CRYPT_INTEGER_BLOB
PCRYPT_ATTR_BLOB typedef ptr CRYPT_INTEGER_BLOB

CMS_DH_KEY_INFO	struct 
dwVersion	DWORD	?
Algid	ALG_ID	?
pszContentEncObjId	LPSTR	?
PubInfo	CRYPT_DATA_BLOB	<>
pReserved	DWORD	?
CMS_DH_KEY_INFO	ends

PCMS_DH_KEY_INFO typedef ptr CMS_DH_KEY_INFO

@DefProto WINADVAPI, CryptAcquireContextA, stdcall, , <:ptr HCRYPTPROV, :LPSTR, :LPSTR, :DWORD, :DWORD>, 20
@DefProto WINADVAPI, CryptAcquireContextW, stdcall, , <:ptr HCRYPTPROV, :LPWSTR, :LPWSTR, :DWORD, :DWORD>, 20
ifdef UNICODE
CryptAcquireContext	EQU	<CryptAcquireContextW>
else 
CryptAcquireContext	EQU	<CryptAcquireContextA>
endif 
@DefProto WINADVAPI, CryptReleaseContext, stdcall, , <:HCRYPTPROV, :DWORD>, 8
@DefProto WINADVAPI, CryptGenKey, stdcall, , <:HCRYPTPROV, :ALG_ID, :DWORD, :ptr HCRYPTKEY>, 16
@DefProto WINADVAPI, CryptDeriveKey, stdcall, , <:HCRYPTPROV, :ALG_ID, :HCRYPTHASH, :DWORD, :ptr HCRYPTKEY>, 20
@DefProto WINADVAPI, CryptDestroyKey, stdcall, , <:HCRYPTKEY>, 4
@DefProto WINADVAPI, CryptSetKeyParam, stdcall, , <:HCRYPTKEY, :DWORD, :ptr BYTE, :DWORD>, 16
@DefProto WINADVAPI, CryptGetKeyParam, stdcall, , <:HCRYPTKEY, :DWORD, :ptr BYTE, :ptr DWORD, :DWORD>, 20
@DefProto WINADVAPI, CryptSetHashParam, stdcall, , <:HCRYPTHASH, :DWORD, :ptr BYTE, :DWORD>, 16
@DefProto WINADVAPI, CryptGetHashParam, stdcall, , <:HCRYPTHASH, :DWORD, :ptr BYTE, :ptr DWORD, :DWORD>, 20
@DefProto WINADVAPI, CryptSetProvParam, stdcall, , <:HCRYPTPROV, :DWORD, :ptr BYTE, :DWORD>, 16
@DefProto WINADVAPI, CryptGetProvParam, stdcall, , <:HCRYPTPROV, :DWORD, :ptr BYTE, :ptr DWORD, :DWORD>, 20
@DefProto WINADVAPI, CryptGenRandom, stdcall, , <:HCRYPTPROV, :DWORD, :ptr BYTE>, 12
@DefProto WINADVAPI, CryptGetUserKey, stdcall, , <:HCRYPTPROV, :DWORD, :ptr HCRYPTKEY>, 12
@DefProto WINADVAPI, CryptExportKey, stdcall, , <:HCRYPTKEY, :HCRYPTKEY, :DWORD, :DWORD, :ptr BYTE, :ptr DWORD>, 24
@DefProto WINADVAPI, CryptImportKey, stdcall, , <:HCRYPTPROV, :ptr BYTE, :DWORD, :HCRYPTKEY, :DWORD, :ptr HCRYPTKEY>, 24
@DefProto WINADVAPI, CryptEncrypt, stdcall, , <:HCRYPTKEY, :HCRYPTHASH, :BOOL, :DWORD, :ptr BYTE, :ptr DWORD, :DWORD>, 28
@DefProto WINADVAPI, CryptDecrypt, stdcall, , <:HCRYPTKEY, :HCRYPTHASH, :BOOL, :DWORD, :ptr BYTE, :ptr DWORD>, 24
@DefProto WINADVAPI, CryptCreateHash, stdcall, , <:HCRYPTPROV, :ALG_ID, :HCRYPTKEY, :DWORD, :ptr HCRYPTHASH>, 20
@DefProto WINADVAPI, CryptHashData, stdcall, , <:HCRYPTHASH, :ptr BYTE, :DWORD, :DWORD>, 16
@DefProto WINADVAPI, CryptHashSessionKey, stdcall, , <:HCRYPTHASH, :HCRYPTKEY, :DWORD>, 12
@DefProto WINADVAPI, CryptDestroyHash, stdcall, , <:HCRYPTHASH>, 4
@DefProto WINADVAPI, CryptSignHashA, stdcall, , <:HCRYPTHASH, :DWORD, :LPSTR, :DWORD, :ptr BYTE, :ptr DWORD>, 24
@DefProto WINADVAPI, CryptSignHashW, stdcall, , <:HCRYPTHASH, :DWORD, :LPWSTR, :DWORD, :ptr BYTE, :ptr DWORD>, 24
ifdef UNICODE
CryptSignHash	EQU	<CryptSignHashW>
else 
CryptSignHash	EQU	<CryptSignHashA>
endif 
@DefProto WINADVAPI, CryptVerifySignatureA, stdcall, , <:HCRYPTHASH, :ptr BYTE, :DWORD, :HCRYPTKEY, :LPSTR, :DWORD>, 24
@DefProto WINADVAPI, CryptVerifySignatureW, stdcall, , <:HCRYPTHASH, :ptr BYTE, :DWORD, :HCRYPTKEY, :LPWSTR, :DWORD>, 24
ifdef UNICODE
CryptVerifySignature	EQU	<CryptVerifySignatureW>
else 
CryptVerifySignature	EQU	<CryptVerifySignatureA>
endif 
@DefProto WINADVAPI, CryptSetProviderA, stdcall, , <:LPSTR, :DWORD>, 8
@DefProto WINADVAPI, CryptSetProviderW, stdcall, , <:LPWSTR, :DWORD>, 8
ifdef UNICODE
CryptSetProvider	EQU	<CryptSetProviderW>
else 
CryptSetProvider	EQU	<CryptSetProviderA>
endif 
@DefProto WINADVAPI, CryptSetProviderExA, stdcall, , <:LPSTR, :DWORD, :ptr DWORD, :DWORD>, 16
@DefProto WINADVAPI, CryptSetProviderExW, stdcall, , <:LPWSTR, :DWORD, :ptr DWORD, :DWORD>, 16
ifdef UNICODE
CryptSetProviderEx	EQU	<CryptSetProviderExW>
else 
CryptSetProviderEx	EQU	<CryptSetProviderExA>
endif 
@DefProto WINADVAPI, CryptGetDefaultProviderA, stdcall, , <:DWORD, :ptr DWORD, :DWORD, :LPSTR, :ptr DWORD>, 20
@DefProto WINADVAPI, CryptGetDefaultProviderW, stdcall, , <:DWORD, :ptr DWORD, :DWORD, :LPWSTR, :ptr DWORD>, 20
ifdef UNICODE
CryptGetDefaultProvider	EQU	<CryptGetDefaultProviderW>
else 
CryptGetDefaultProvider	EQU	<CryptGetDefaultProviderA>
endif 
@DefProto WINADVAPI, CryptEnumProviderTypesA, stdcall, , <:DWORD, :ptr DWORD, :DWORD, :ptr DWORD, :LPSTR, :ptr DWORD>, 24
@DefProto WINADVAPI, CryptEnumProviderTypesW, stdcall, , <:DWORD, :ptr DWORD, :DWORD, :ptr DWORD, :LPWSTR, :ptr DWORD>, 24
ifdef UNICODE
CryptEnumProviderTypes	EQU	<CryptEnumProviderTypesW>
else 
CryptEnumProviderTypes	EQU	<CryptEnumProviderTypesA>
endif 
@DefProto WINADVAPI, CryptEnumProvidersA, stdcall, , <:DWORD, :ptr DWORD, :DWORD, :ptr DWORD, :LPSTR, :ptr DWORD>, 24
@DefProto WINADVAPI, CryptEnumProvidersW, stdcall, , <:DWORD, :ptr DWORD, :DWORD, :ptr DWORD, :LPWSTR, :ptr DWORD>, 24
ifdef UNICODE
CryptEnumProviders	EQU	<CryptEnumProvidersW>
else 
CryptEnumProviders	EQU	<CryptEnumProvidersA>
endif 
@DefProto WINADVAPI, CryptContextAddRef, stdcall, , <:HCRYPTPROV, :ptr DWORD, :DWORD>, 12
@DefProto WINADVAPI, CryptDuplicateKey, stdcall, , <:HCRYPTKEY, :ptr DWORD, :DWORD, :ptr HCRYPTKEY>, 16
@DefProto WINADVAPI, CryptDuplicateHash, stdcall, , <:HCRYPTHASH, :ptr DWORD, :DWORD, :ptr HCRYPTHASH>, 16
_CRYPT_KEY_LIMITS_V01	struct 
dwVersion	DWORD	?
algId	ALG_ID	?
dwMinKeyLength	DWORD	?
dwMaxKeyLength	DWORD	?
dwRequiredFlags	DWORD	?
dwDisallowedFlags	DWORD	?
_CRYPT_KEY_LIMITS_V01	ends

CRYPT_KEY_LIMITS typedef _CRYPT_KEY_LIMITS_V01
PCRYPT_KEY_LIMITS typedef ptr _CRYPT_KEY_LIMITS_V01
CRYPTLIMIT_USING_PCT	EQU	0001h
CRYPTLIMIT_USING_SGC	EQU	0002h
@DefProto WINADVAPI, CryptGetLocalKeyLimits, stdcall, , <:ALG_ID, :DWORD, :PCRYPT_KEY_LIMITS, :LPDWORD>, 16
CRYPT_BIT_BLOB	struct 
cbData	DWORD	?
pbData	DWORD	?
cUnusedBits	DWORD	?
CRYPT_BIT_BLOB	ends

PCRYPT_BIT_BLOB typedef ptr CRYPT_BIT_BLOB

CRYPT_ALGORITHM_IDENTIFIER	struct 
pszObjId	LPSTR	?
Parameters	CRYPT_OBJID_BLOB	<>
CRYPT_ALGORITHM_IDENTIFIER	ends

PCRYPT_ALGORITHM_IDENTIFIER typedef ptr CRYPT_ALGORITHM_IDENTIFIER

szOID_RSA	EQU	<"1.2.840.113549">
szOID_PKCS	EQU	<"1.2.840.113549.1">
szOID_RSA_HASH	EQU	<"1.2.840.113549.2">
szOID_RSA_ENCRYPT	EQU	<"1.2.840.113549.3">
szOID_PKCS_1	EQU	<"1.2.840.113549.1.1">
szOID_PKCS_2	EQU	<"1.2.840.113549.1.2">
szOID_PKCS_3	EQU	<"1.2.840.113549.1.3">
szOID_PKCS_4	EQU	<"1.2.840.113549.1.4">
szOID_PKCS_5	EQU	<"1.2.840.113549.1.5">
szOID_PKCS_6	EQU	<"1.2.840.113549.1.6">
szOID_PKCS_7	EQU	<"1.2.840.113549.1.7">
szOID_PKCS_8	EQU	<"1.2.840.113549.1.8">
szOID_PKCS_9	EQU	<"1.2.840.113549.1.9">
szOID_PKCS_10	EQU	<"1.2.840.113549.1.10">
szOID_PKCS_12	EQU	<"1.2.840.113549.1.12">
szOID_RSA_RSA	EQU	<"1.2.840.113549.1.1.1">
szOID_RSA_MD2RSA	EQU	<"1.2.840.113549.1.1.2">
szOID_RSA_MD4RSA	EQU	<"1.2.840.113549.1.1.3">
szOID_RSA_MD5RSA	EQU	<"1.2.840.113549.1.1.4">
szOID_RSA_SHA1RSA	EQU	<"1.2.840.113549.1.1.5">
szOID_RSA_SETOAEP_RSA	EQU	<"1.2.840.113549.1.1.6">
szOID_RSA_DH	EQU	<"1.2.840.113549.1.3.1">
szOID_RSA_data	EQU	<"1.2.840.113549.1.7.1">
szOID_RSA_signedData	EQU	<"1.2.840.113549.1.7.2">
szOID_RSA_envelopedData	EQU	<"1.2.840.113549.1.7.3">
szOID_RSA_signEnvData	EQU	<"1.2.840.113549.1.7.4">
szOID_RSA_digestedData	EQU	<"1.2.840.113549.1.7.5">
szOID_RSA_hashedData	EQU	<"1.2.840.113549.1.7.5">
szOID_RSA_encryptedData	EQU	<"1.2.840.113549.1.7.6">
szOID_RSA_emailAddr	EQU	<"1.2.840.113549.1.9.1">
szOID_RSA_unstructName	EQU	<"1.2.840.113549.1.9.2">
szOID_RSA_contentType	EQU	<"1.2.840.113549.1.9.3">
szOID_RSA_messageDigest	EQU	<"1.2.840.113549.1.9.4">
szOID_RSA_signingTime	EQU	<"1.2.840.113549.1.9.5">
szOID_RSA_counterSign	EQU	<"1.2.840.113549.1.9.6">
szOID_RSA_challengePwd	EQU	<"1.2.840.113549.1.9.7">
szOID_RSA_unstructAddr	EQU	<"1.2.840.113549.1.9.8">
szOID_RSA_extCertAttrs	EQU	<"1.2.840.113549.1.9.9">
szOID_RSA_certExtensions	EQU	<"1.2.840.113549.1.9.14">
szOID_RSA_SMIMECapabilities	EQU	<"1.2.840.113549.1.9.15">
szOID_RSA_preferSignedData	EQU	<"1.2.840.113549.1.9.15.1">
szOID_RSA_SMIMEalg	EQU	<"1.2.840.113549.1.9.16.3">
szOID_RSA_SMIMEalgESDH	EQU	<"1.2.840.113549.1.9.16.3.5">
szOID_RSA_SMIMEalgCMS3DESwrap	EQU	<"1.2.840.113549.1.9.16.3.6">
szOID_RSA_SMIMEalgCMSRC2wrap	EQU	<"1.2.840.113549.1.9.16.3.7">
szOID_RSA_MD2	EQU	<"1.2.840.113549.2.2">
szOID_RSA_MD4	EQU	<"1.2.840.113549.2.4">
szOID_RSA_MD5	EQU	<"1.2.840.113549.2.5">
szOID_RSA_RC2CBC	EQU	<"1.2.840.113549.3.2">
szOID_RSA_RC4	EQU	<"1.2.840.113549.3.4">
szOID_RSA_DES_EDE3_CBC	EQU	<"1.2.840.113549.3.7">
szOID_RSA_RC5_CBCPad	EQU	<"1.2.840.113549.3.9">
szOID_ANSI_X942	EQU	<"1.2.840.10046">
szOID_ANSI_X942_DH	EQU	<"1.2.840.10046.2.1">
szOID_X957	EQU	<"1.2.840.10040">
szOID_X957_DSA	EQU	<"1.2.840.10040.4.1">
szOID_X957_SHA1DSA	EQU	<"1.2.840.10040.4.3">
szOID_DS	EQU	<"2.5">
szOID_DSALG	EQU	<"2.5.8">
szOID_DSALG_CRPT	EQU	<"2.5.8.1">
szOID_DSALG_HASH	EQU	<"2.5.8.2">
szOID_DSALG_SIGN	EQU	<"2.5.8.3">
szOID_DSALG_RSA	EQU	<"2.5.8.1.1">
szOID_OIW	EQU	<"1.3.14">
szOID_OIWSEC	EQU	<"1.3.14.3.2">
szOID_OIWSEC_md4RSA	EQU	<"1.3.14.3.2.2">
szOID_OIWSEC_md5RSA	EQU	<"1.3.14.3.2.3">
szOID_OIWSEC_md4RSA2	EQU	<"1.3.14.3.2.4">
szOID_OIWSEC_desECB	EQU	<"1.3.14.3.2.6">
szOID_OIWSEC_desCBC	EQU	<"1.3.14.3.2.7">
szOID_OIWSEC_desOFB	EQU	<"1.3.14.3.2.8">
szOID_OIWSEC_desCFB	EQU	<"1.3.14.3.2.9">
szOID_OIWSEC_desMAC	EQU	<"1.3.14.3.2.10">
szOID_OIWSEC_rsaSign	EQU	<"1.3.14.3.2.11">
szOID_OIWSEC_dsa	EQU	<"1.3.14.3.2.12">
szOID_OIWSEC_shaDSA	EQU	<"1.3.14.3.2.13">
szOID_OIWSEC_mdc2RSA	EQU	<"1.3.14.3.2.14">
szOID_OIWSEC_shaRSA	EQU	<"1.3.14.3.2.15">
szOID_OIWSEC_dhCommMod	EQU	<"1.3.14.3.2.16">
szOID_OIWSEC_desEDE	EQU	<"1.3.14.3.2.17">
szOID_OIWSEC_sha	EQU	<"1.3.14.3.2.18">
szOID_OIWSEC_mdc2	EQU	<"1.3.14.3.2.19">
szOID_OIWSEC_dsaComm	EQU	<"1.3.14.3.2.20">
szOID_OIWSEC_dsaCommSHA	EQU	<"1.3.14.3.2.21">
szOID_OIWSEC_rsaXchg	EQU	<"1.3.14.3.2.22">
szOID_OIWSEC_keyHashSeal	EQU	<"1.3.14.3.2.23">
szOID_OIWSEC_md2RSASign	EQU	<"1.3.14.3.2.24">
szOID_OIWSEC_md5RSASign	EQU	<"1.3.14.3.2.25">
szOID_OIWSEC_sha1	EQU	<"1.3.14.3.2.26">
szOID_OIWSEC_dsaSHA1	EQU	<"1.3.14.3.2.27">
szOID_OIWSEC_dsaCommSHA1	EQU	<"1.3.14.3.2.28">
szOID_OIWSEC_sha1RSASign	EQU	<"1.3.14.3.2.29">
szOID_OIWDIR	EQU	<"1.3.14.7.2">
szOID_OIWDIR_CRPT	EQU	<"1.3.14.7.2.1">
szOID_OIWDIR_HASH	EQU	<"1.3.14.7.2.2">
szOID_OIWDIR_SIGN	EQU	<"1.3.14.7.2.3">
szOID_OIWDIR_md2	EQU	<"1.3.14.7.2.2.1">
szOID_OIWDIR_md2RSA	EQU	<"1.3.14.7.2.3.1">
szOID_INFOSEC	EQU	<"2.16.840.1.101.2.1">
szOID_INFOSEC_sdnsSignature	EQU	<"2.16.840.1.101.2.1.1.1">
szOID_INFOSEC_mosaicSignature	EQU	<"2.16.840.1.101.2.1.1.2">
szOID_INFOSEC_sdnsConfidentiality	EQU	<"2.16.840.1.101.2.1.1.3">
szOID_INFOSEC_mosaicConfidentiality	EQU	<"2.16.840.1.101.2.1.1.4">
szOID_INFOSEC_sdnsIntegrity	EQU	<"2.16.840.1.101.2.1.1.5">
szOID_INFOSEC_mosaicIntegrity	EQU	<"2.16.840.1.101.2.1.1.6">
szOID_INFOSEC_sdnsTokenProtection	EQU	<"2.16.840.1.101.2.1.1.7">
szOID_INFOSEC_mosaicTokenProtection	EQU	<"2.16.840.1.101.2.1.1.8">
szOID_INFOSEC_sdnsKeyManagement	EQU	<"2.16.840.1.101.2.1.1.9">
szOID_INFOSEC_mosaicKeyManagement	EQU	<"2.16.840.1.101.2.1.1.10">
szOID_INFOSEC_sdnsKMandSig	EQU	<"2.16.840.1.101.2.1.1.11">
szOID_INFOSEC_mosaicKMandSig	EQU	<"2.16.840.1.101.2.1.1.12">
szOID_INFOSEC_SuiteASignature	EQU	<"2.16.840.1.101.2.1.1.13">
szOID_INFOSEC_SuiteAConfidentiality	EQU	<"2.16.840.1.101.2.1.1.14">
szOID_INFOSEC_SuiteAIntegrity	EQU	<"2.16.840.1.101.2.1.1.15">
szOID_INFOSEC_SuiteATokenProtection	EQU	<"2.16.840.1.101.2.1.1.16">
szOID_INFOSEC_SuiteAKeyManagement	EQU	<"2.16.840.1.101.2.1.1.17">
szOID_INFOSEC_SuiteAKMandSig	EQU	<"2.16.840.1.101.2.1.1.18">
szOID_INFOSEC_mosaicUpdatedSig	EQU	<"2.16.840.1.101.2.1.1.19">
szOID_INFOSEC_mosaicKMandUpdSig	EQU	<"2.16.840.1.101.2.1.1.20">
szOID_INFOSEC_mosaicUpdatedInteg	EQU	<"2.16.840.1.101.2.1.1.21">
CRYPT_OBJID_TABLE	struct 
dwAlgId	DWORD	?
pszObjId	LPSTR	?
CRYPT_OBJID_TABLE	ends

PCRYPT_OBJID_TABLE typedef ptr CRYPT_OBJID_TABLE

CRYPT_HASH_INFO	struct 
HashAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
Hash	CRYPT_HASH_BLOB	<>
CRYPT_HASH_INFO	ends

PCRYPT_HASH_INFO typedef ptr CRYPT_HASH_INFO

CERT_EXTENSION	struct 
pszObjId	LPSTR	?
fCritical	BOOL	?
Value	CRYPT_OBJID_BLOB	<>
CERT_EXTENSION	ends

PCERT_EXTENSION typedef ptr CERT_EXTENSION

CRYPT_ATTRIBUTE_TYPE_VALUE	struct 
pszObjId	LPSTR	?
Value	CRYPT_OBJID_BLOB	<>
CRYPT_ATTRIBUTE_TYPE_VALUE	ends

PCRYPT_ATTRIBUTE_TYPE_VALUE typedef ptr CRYPT_ATTRIBUTE_TYPE_VALUE

CRYPT_ATTRIBUTE	struct 
pszObjId	LPSTR	?
cValue	DWORD	?
rgValue	PCRYPT_ATTR_BLOB	?
CRYPT_ATTRIBUTE	ends

PCRYPT_ATTRIBUTE typedef ptr CRYPT_ATTRIBUTE

CRYPT_ATTRIBUTES	struct 
cAttr	DWORD	?
rgAttr	PCRYPT_ATTRIBUTE	?
CRYPT_ATTRIBUTES	ends

PCRYPT_ATTRIBUTES typedef ptr CRYPT_ATTRIBUTES

CERT_RDN_ATTR	struct 
pszObjId	LPSTR	?
dwValueType	DWORD	?
Value	CERT_RDN_VALUE_BLOB	<>
CERT_RDN_ATTR	ends

PCERT_RDN_ATTR typedef ptr CERT_RDN_ATTR

szOID_COMMON_NAME	EQU	<"2.5.4.3">
szOID_SUR_NAME	EQU	<"2.5.4.4">
szOID_DEVICE_SERIAL_NUMBER	EQU	<"2.5.4.5">
szOID_COUNTRY_NAME	EQU	<"2.5.4.6">
szOID_LOCALITY_NAME	EQU	<"2.5.4.7">
szOID_STATE_OR_PROVINCE_NAME	EQU	<"2.5.4.8">
szOID_STREET_ADDRESS	EQU	<"2.5.4.9">
szOID_ORGANIZATION_NAME	EQU	<"2.5.4.10">
szOID_ORGANIZATIONAL_UNIT_NAME	EQU	<"2.5.4.11">
szOID_TITLE	EQU	<"2.5.4.12">
szOID_DESCRIPTION	EQU	<"2.5.4.13">
szOID_SEARCH_GUIDE	EQU	<"2.5.4.14">
szOID_BUSINESS_CATEGORY	EQU	<"2.5.4.15">
szOID_POSTAL_ADDRESS	EQU	<"2.5.4.16">
szOID_POSTAL_CODE	EQU	<"2.5.4.17">
szOID_POST_OFFICE_BOX	EQU	<"2.5.4.18">
szOID_PHYSICAL_DELIVERY_OFFICE_NAME	EQU	<"2.5.4.19">
szOID_TELEPHONE_NUMBER	EQU	<"2.5.4.20">
szOID_TELEX_NUMBER	EQU	<"2.5.4.21">
szOID_TELETEXT_TERMINAL_IDENTIFIER	EQU	<"2.5.4.22">
szOID_FACSIMILE_TELEPHONE_NUMBER	EQU	<"2.5.4.23">
szOID_X21_ADDRESS	EQU	<"2.5.4.24">
szOID_INTERNATIONAL_ISDN_NUMBER	EQU	<"2.5.4.25">
szOID_REGISTERED_ADDRESS	EQU	<"2.5.4.26">
szOID_DESTINATION_INDICATOR	EQU	<"2.5.4.27">
szOID_PREFERRED_DELIVERY_METHOD	EQU	<"2.5.4.28">
szOID_PRESENTATION_ADDRESS	EQU	<"2.5.4.29">
szOID_SUPPORTED_APPLICATION_CONTEXT	EQU	<"2.5.4.30">
szOID_MEMBER	EQU	<"2.5.4.31">
szOID_OWNER	EQU	<"2.5.4.32">
szOID_ROLE_OCCUPANT	EQU	<"2.5.4.33">
szOID_SEE_ALSO	EQU	<"2.5.4.34">
szOID_USER_PASSWORD	EQU	<"2.5.4.35">
szOID_USER_CERTIFICATE	EQU	<"2.5.4.36">
szOID_CA_CERTIFICATE	EQU	<"2.5.4.37">
szOID_AUTHORITY_REVOCATION_LIST	EQU	<"2.5.4.38">
szOID_CERTIFICATE_REVOCATION_LIST	EQU	<"2.5.4.39">
szOID_CROSS_CERTIFICATE_PAIR	EQU	<"2.5.4.40">
szOID_GIVEN_NAME	EQU	<"2.5.4.42">
szOID_INITIALS	EQU	<"2.5.4.43">
szOID_DN_QUALIFIER	EQU	<"2.5.4.46">
szOID_DOMAIN_COMPONENT	EQU	<"0.9.2342.19200300.100.1.25">
szOID_PKCS_12_FRIENDLY_NAME_ATTR	EQU	<"1.2.840.113549.1.9.20">
szOID_PKCS_12_LOCAL_KEY_ID	EQU	<"1.2.840.113549.1.9.21">
szOID_PKCS_12_KEY_PROVIDER_NAME_ATTR	EQU	<"1.3.6.1.4.1.311.17.1">
szOID_LOCAL_MACHINE_KEYSET	EQU	<"1.3.6.1.4.1.311.17.2">
szOID_KEYID_RDN	EQU	<"1.3.6.1.4.1.311.10.7.1">
CERT_RDN_ANY_TYPE	EQU	0
CERT_RDN_ENCODED_BLOB	EQU	1
CERT_RDN_OCTET_STRING	EQU	2
CERT_RDN_NUMERIC_STRING	EQU	3
CERT_RDN_PRINTABLE_STRING	EQU	4
CERT_RDN_TELETEX_STRING	EQU	5
CERT_RDN_T61_STRING	EQU	5
CERT_RDN_VIDEOTEX_STRING	EQU	6
CERT_RDN_IA5_STRING	EQU	7
CERT_RDN_GRAPHIC_STRING	EQU	8
CERT_RDN_VISIBLE_STRING	EQU	9
CERT_RDN_ISO646_STRING	EQU	9
CERT_RDN_GENERAL_STRING	EQU	10
CERT_RDN_UNIVERSAL_STRING	EQU	11
CERT_RDN_INT4_STRING	EQU	11
CERT_RDN_BMP_STRING	EQU	12
CERT_RDN_UNICODE_STRING	EQU	12
CERT_RDN_UTF8_STRING	EQU	13
CERT_RDN_TYPE_MASK	EQU	000000FFh
CERT_RDN_FLAGS_MASK	EQU	0FF000000h
CERT_RDN_ENABLE_T61_UNICODE_FLAG	EQU	80000000h
CERT_RDN_ENABLE_UTF8_UNICODE_FLAG	EQU	20000000h
CERT_RDN_DISABLE_CHECK_TYPE_FLAG	EQU	40000000h
CERT_RDN_DISABLE_IE4_UTF8_FLAG	EQU	01000000h
IS_CERT_RDN_CHAR_STRING macro X
	exitm <( ( ( X )  and  CERT_RDN_TYPE_MASK ) >= CERT_RDN_NUMERIC_STRING ) >
	endm
CERT_RDN	struct 
cRDNAttr	DWORD	?
rgRDNAttr	PCERT_RDN_ATTR	?
CERT_RDN	ends

PCERT_RDN typedef ptr CERT_RDN

CERT_NAME_INFO	struct 
cRDN	DWORD	?
rgRDN	PCERT_RDN	?
CERT_NAME_INFO	ends

PCERT_NAME_INFO typedef ptr CERT_NAME_INFO

CERT_NAME_VALUE	struct 
dwValueType	DWORD	?
Value	CERT_RDN_VALUE_BLOB	<>
CERT_NAME_VALUE	ends

PCERT_NAME_VALUE typedef ptr CERT_NAME_VALUE

CERT_PUBLIC_KEY_INFO	struct 
Algorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
PublicKey	CRYPT_BIT_BLOB	<>
CERT_PUBLIC_KEY_INFO	ends

PCERT_PUBLIC_KEY_INFO typedef ptr CERT_PUBLIC_KEY_INFO

CERT_RSA_PUBLIC_KEY_OBJID	EQU	<szOID_RSA_RSA>
CERT_DEFAULT_OID_PUBLIC_KEY_SIGN	EQU	<szOID_RSA_RSA>
CERT_DEFAULT_OID_PUBLIC_KEY_XCHG	EQU	<szOID_RSA_RSA>
CRYPT_PRIVATE_KEY_INFO	struct 
Version	DWORD	?
Algorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
PrivateKey	CRYPT_DER_BLOB	<>
pAttributes	PCRYPT_ATTRIBUTES	?
CRYPT_PRIVATE_KEY_INFO	ends

PCRYPT_PRIVATE_KEY_INFO typedef ptr CRYPT_PRIVATE_KEY_INFO

CRYPT_ENCRYPTED_PRIVATE_KEY_INFO	struct 
EncryptionAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
EncryptedPrivateKey	CRYPT_DATA_BLOB	<>
CRYPT_ENCRYPTED_PRIVATE_KEY_INFO	ends

PCRYPT_ENCRYPTED_PRIVATE_KEY_INFO typedef ptr CRYPT_ENCRYPTED_PRIVATE_KEY_INFO

proto_PCRYPT_DECRYPT_PRIVATE_KEY_FUNC typedef proto stdcall :CRYPT_ALGORITHM_IDENTIFIER,:CRYPT_DATA_BLOB,:ptr BYTE,:ptr DWORD,:LPVOID
PCRYPT_DECRYPT_PRIVATE_KEY_FUNC typedef ptr proto_PCRYPT_DECRYPT_PRIVATE_KEY_FUNC
proto_PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC typedef proto stdcall :ptr CRYPT_ALGORITHM_IDENTIFIER,:ptr CRYPT_DATA_BLOB,:ptr BYTE,:ptr DWORD,:LPVOID
PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC typedef ptr proto_PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC
proto_PCRYPT_RESOLVE_HCRYPTPROV_FUNC typedef proto stdcall :ptr CRYPT_PRIVATE_KEY_INFO,:ptr HCRYPTPROV,:LPVOID
PCRYPT_RESOLVE_HCRYPTPROV_FUNC typedef ptr proto_PCRYPT_RESOLVE_HCRYPTPROV_FUNC
CRYPT_PKCS8_IMPORT_PARAMS	struct 
PrivateKey	CRYPT_DIGEST_BLOB	<>
pResolvehCryptProvFunc	PCRYPT_RESOLVE_HCRYPTPROV_FUNC	?
pVoidResolveFunc	LPVOID	?
pDecryptPrivateKeyFunc	PCRYPT_DECRYPT_PRIVATE_KEY_FUNC	?
pVoidDecryptFunc	LPVOID	?
CRYPT_PKCS8_IMPORT_PARAMS	ends

PCRYPT_PKCS8_IMPORT_PARAMS typedef ptr CRYPT_PKCS8_IMPORT_PARAMS
CRYPT_PRIVATE_KEY_BLOB_AND_PARAMS typedef CRYPT_PKCS8_IMPORT_PARAMS
PCRYPT_PRIVATE_KEY_BLOB_AND_PARAMS typedef ptr CRYPT_PKCS8_IMPORT_PARAMS

CRYPT_PKCS8_EXPORT_PARAMS	struct 
hCryptProv	HCRYPTPROV	?
dwKeySpec	DWORD	?
pszPrivateKeyObjId	LPSTR	?
pEncryptPrivateKeyFunc	PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC	?
pVoidEncryptFunc	LPVOID	?
CRYPT_PKCS8_EXPORT_PARAMS	ends

PCRYPT_PKCS8_EXPORT_PARAMS typedef ptr CRYPT_PKCS8_EXPORT_PARAMS

CERT_INFO	struct 
dwVersion	DWORD	?
SerialNumber	CRYPT_INTEGER_BLOB	<>
SignatureAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
Issuer	CERT_NAME_BLOB	<>
NotBefore	FILETIME	<>
NotAfter	FILETIME	<>
Subject	CERT_NAME_BLOB	<>
SubjectPublicKeyInfo	CERT_PUBLIC_KEY_INFO	<>
IssuerUniqueId	CRYPT_BIT_BLOB	<>
SubjectUniqueId	CRYPT_BIT_BLOB	<>
cExtension	DWORD	?
rgExtension	PCERT_EXTENSION	?
CERT_INFO	ends

PCERT_INFO typedef ptr CERT_INFO

CERT_V1	EQU	0
CERT_V2	EQU	1
CERT_V3	EQU	2
CERT_INFO_VERSION_FLAG	EQU	1
CERT_INFO_SERIAL_NUMBER_FLAG	EQU	2
CERT_INFO_SIGNATURE_ALGORITHM_FLAG	EQU	3
CERT_INFO_ISSUER_FLAG	EQU	4
CERT_INFO_NOT_BEFORE_FLAG	EQU	5
CERT_INFO_NOT_AFTER_FLAG	EQU	6
CERT_INFO_SUBJECT_FLAG	EQU	7
CERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG	EQU	8
CERT_INFO_ISSUER_UNIQUE_ID_FLAG	EQU	9
CERT_INFO_SUBJECT_UNIQUE_ID_FLAG	EQU	10
CERT_INFO_EXTENSION_FLAG	EQU	11
CRL_ENTRY	struct 
SerialNumber	CRYPT_INTEGER_BLOB	<>
RevocationDate	FILETIME	<>
cExtension	DWORD	?
rgExtension	PCERT_EXTENSION	?
CRL_ENTRY	ends

PCRL_ENTRY typedef ptr CRL_ENTRY

CRL_INFO	struct 
dwVersion	DWORD	?
SignatureAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
Issuer	CERT_NAME_BLOB	<>
ThisUpdate	FILETIME	<>
NextUpdate	FILETIME	<>
cCRLEntry	DWORD	?
rgCRLEntry	PCRL_ENTRY	?
cExtension	DWORD	?
rgExtension	PCERT_EXTENSION	?
CRL_INFO	ends

PCRL_INFO typedef ptr CRL_INFO

CRL_V1	EQU	0
CRL_V2	EQU	1
CERT_REQUEST_INFO	struct 
dwVersion	DWORD	?
Subject	CERT_NAME_BLOB	<>
SubjectPublicKeyInfo	CERT_PUBLIC_KEY_INFO	<>
cAttribute	DWORD	?
rgAttribute	PCRYPT_ATTRIBUTE	?
CERT_REQUEST_INFO	ends

PCERT_REQUEST_INFO typedef ptr CERT_REQUEST_INFO

CERT_REQUEST_V1	EQU	0
CERT_KEYGEN_REQUEST_INFO	struct 
dwVersion	DWORD	?
SubjectPublicKeyInfo	CERT_PUBLIC_KEY_INFO	<>
pwszChallengeString	LPWSTR	?
CERT_KEYGEN_REQUEST_INFO	ends

PCERT_KEYGEN_REQUEST_INFO typedef ptr CERT_KEYGEN_REQUEST_INFO

CERT_KEYGEN_REQUEST_V1	EQU	0
CERT_SIGNED_CONTENT_INFO	struct 
ToBeSigned	CRYPT_DER_BLOB	<>
SignatureAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
Signature	CRYPT_BIT_BLOB	<>
CERT_SIGNED_CONTENT_INFO	ends

PCERT_SIGNED_CONTENT_INFO typedef ptr CERT_SIGNED_CONTENT_INFO

CTL_USAGE	struct 
cUsageIdentifier	DWORD	?
rgpszUsageIdentifier	DWORD	?
CTL_USAGE	ends

PCTL_USAGE typedef ptr CTL_USAGE
CERT_ENHKEY_USAGE typedef CTL_USAGE
PCERT_ENHKEY_USAGE typedef ptr CTL_USAGE

CTL_ENTRY	struct 
SubjectIdentifier	CRYPT_DATA_BLOB	<>
cAttribute	DWORD	?
rgAttribute	PCRYPT_ATTRIBUTE	?
CTL_ENTRY	ends

PCTL_ENTRY typedef ptr CTL_ENTRY

CTL_INFO	struct 
dwVersion	DWORD	?
SubjectUsage	CTL_USAGE	<>
ListIdentifier	CRYPT_DATA_BLOB	<>
SequenceNumber	CRYPT_INTEGER_BLOB	<>
ThisUpdate	FILETIME	<>
NextUpdate	FILETIME	<>
SubjectAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
cCTLEntry	DWORD	?
rgCTLEntry	PCTL_ENTRY	?
cExtension	DWORD	?
rgExtension	PCERT_EXTENSION	?
CTL_INFO	ends

PCTL_INFO typedef ptr CTL_INFO

CTL_V1	EQU	0
CRYPT_TIME_STAMP_REQUEST_INFO	struct 
pszTimeStampAlgorithm	LPSTR	?
pszContentType	LPSTR	?
Content	CRYPT_OBJID_BLOB	<>
cAttribute	DWORD	?
rgAttribute	PCRYPT_ATTRIBUTE	?
CRYPT_TIME_STAMP_REQUEST_INFO	ends

PCRYPT_TIME_STAMP_REQUEST_INFO typedef ptr CRYPT_TIME_STAMP_REQUEST_INFO

CRYPT_ENROLLMENT_NAME_VALUE_PAIR	struct 
pwszName	LPWSTR	?
pwszValue	LPWSTR	?
CRYPT_ENROLLMENT_NAME_VALUE_PAIR	ends

PCRYPT_ENROLLMENT_NAME_VALUE_PAIR typedef ptr CRYPT_ENROLLMENT_NAME_VALUE_PAIR

CRYPT_CSP_PROVIDER	struct 
dwKeySpec	DWORD	?
pwszProviderName	LPWSTR	?
Signature	CRYPT_BIT_BLOB	<>
CRYPT_CSP_PROVIDER	ends

PCRYPT_CSP_PROVIDER typedef ptr CRYPT_CSP_PROVIDER

CERT_ENCODING_TYPE_MASK	EQU	0000FFFFh
CMSG_ENCODING_TYPE_MASK	EQU	0FFFF0000h
GET_CERT_ENCODING_TYPE macro X
	exitm <( X  and  CERT_ENCODING_TYPE_MASK ) >
	endm
GET_CMSG_ENCODING_TYPE macro X
	exitm <( X  and  CMSG_ENCODING_TYPE_MASK ) >
	endm
CRYPT_ASN_ENCODING	EQU	00000001h
CRYPT_NDR_ENCODING	EQU	00000002h
X509_ASN_ENCODING	EQU	00000001h
X509_NDR_ENCODING	EQU	00000002h
PKCS_7_ASN_ENCODING	EQU	00010000h
PKCS_7_NDR_ENCODING	EQU	00020000h
@DefProto WINCRYPT32API, CryptFormatObject, stdcall, , <:DWORD, :DWORD, :DWORD, :ptr , :LPSTR, :ptr BYTE, :DWORD, :ptr , :ptr DWORD>, 36
CRYPT_FORMAT_STR_MULTI_LINE	EQU	0001h
CRYPT_FORMAT_STR_NO_HEX	EQU	0010h
CRYPT_FORMAT_SIMPLE	EQU	0001h
CRYPT_FORMAT_X509	EQU	0002h
CRYPT_FORMAT_OID	EQU	0004h
CRYPT_FORMAT_RDN_SEMICOLON	EQU	0100h
CRYPT_FORMAT_RDN_CRLF	EQU	0200h
CRYPT_FORMAT_RDN_UNQUOTE	EQU	0400h
CRYPT_FORMAT_RDN_REVERSE	EQU	0800h
CRYPT_FORMAT_COMMA	EQU	1000h
CRYPT_FORMAT_SEMICOLON	EQU	<CRYPT_FORMAT_RDN_SEMICOLON>
CRYPT_FORMAT_CRLF	EQU	<CRYPT_FORMAT_RDN_CRLF>
proto_PFN_CRYPT_ALLOC typedef proto stdcall :size_t
PFN_CRYPT_ALLOC typedef ptr proto_PFN_CRYPT_ALLOC
proto_PFN_CRYPT_FREE typedef proto stdcall :LPVOID
PFN_CRYPT_FREE typedef ptr proto_PFN_CRYPT_FREE
CRYPT_ENCODE_PARA	struct 
cbSize	DWORD	?
pfnAlloc	PFN_CRYPT_ALLOC	?
pfnFree	PFN_CRYPT_FREE	?
CRYPT_ENCODE_PARA	ends

PCRYPT_ENCODE_PARA typedef ptr CRYPT_ENCODE_PARA

@DefProto WINCRYPT32API, CryptEncodeObjectEx, stdcall, , <:DWORD, :LPSTR, :ptr , :DWORD, :PCRYPT_ENCODE_PARA, :ptr , :ptr DWORD>, 28
@DefProto WINCRYPT32API, CryptEncodeObject, stdcall, , <:DWORD, :LPSTR, :ptr , :ptr BYTE, :ptr DWORD>, 20
CRYPT_ENCODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG	EQU	8h
CRYPT_ENCODE_ALLOC_FLAG	EQU	8000h
CRYPT_UNICODE_NAME_ENCODE_ENABLE_T61_UNICODE_FLAG	EQU	<CERT_RDN_ENABLE_T61_UNICODE_FLAG>
CRYPT_UNICODE_NAME_ENCODE_ENABLE_UTF8_UNICODE_FLAG	EQU	<CERT_RDN_ENABLE_UTF8_UNICODE_FLAG>
CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG	EQU	<CERT_RDN_DISABLE_CHECK_TYPE_FLAG>
CRYPT_SORTED_CTL_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG	EQU	10000h
CRYPT_DECODE_PARA	struct 
cbSize	DWORD	?
pfnAlloc	PFN_CRYPT_ALLOC	?
pfnFree	PFN_CRYPT_FREE	?
CRYPT_DECODE_PARA	ends

PCRYPT_DECODE_PARA typedef ptr CRYPT_DECODE_PARA

@DefProto WINCRYPT32API, CryptDecodeObjectEx, stdcall, , <:DWORD, :LPSTR, :ptr BYTE, :DWORD, :DWORD, :PCRYPT_DECODE_PARA, :ptr , :ptr DWORD>, 32
@DefProto WINCRYPT32API, CryptDecodeObject, stdcall, , <:DWORD, :LPSTR, :ptr BYTE, :DWORD, :DWORD, :ptr , :ptr DWORD>, 28
CRYPT_DECODE_NOCOPY_FLAG	EQU	1h
CRYPT_DECODE_TO_BE_SIGNED_FLAG	EQU	2h
CRYPT_DECODE_SHARE_OID_STRING_FLAG	EQU	4h
CRYPT_DECODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG	EQU	8h
CRYPT_DECODE_ALLOC_FLAG	EQU	8000h
CRYPT_UNICODE_NAME_DECODE_DISABLE_IE4_UTF8_FLAG	EQU	<CERT_RDN_DISABLE_IE4_UTF8_FLAG>
CRYPT_ENCODE_DECODE_NONE	EQU	0
X509_CERT	EQU	1
X509_CERT_TO_BE_SIGNED	EQU	2
X509_CERT_CRL_TO_BE_SIGNED	EQU	3
X509_CERT_REQUEST_TO_BE_SIGNED	EQU	4
X509_EXTENSIONS	EQU	5
X509_NAME_VALUE	EQU	6
X509_NAME	EQU	7
X509_PUBLIC_KEY_INFO	EQU	8
X509_AUTHORITY_KEY_ID	EQU	9
X509_KEY_ATTRIBUTES	EQU	10
X509_KEY_USAGE_RESTRICTION	EQU	11
X509_ALTERNATE_NAME	EQU	12
X509_BASIC_CONSTRAINTS	EQU	13
X509_KEY_USAGE	EQU	14
X509_BASIC_CONSTRAINTS2	EQU	15
X509_CERT_POLICIES	EQU	16
PKCS_UTC_TIME	EQU	17
PKCS_TIME_REQUEST	EQU	18
RSA_CSP_PUBLICKEYBLOB	EQU	19
X509_UNICODE_NAME	EQU	20
X509_KEYGEN_REQUEST_TO_BE_SIGNED	EQU	21
PKCS_ATTRIBUTE	EQU	22
PKCS_CONTENT_INFO_SEQUENCE_OF_ANY	EQU	23
X509_UNICODE_NAME_VALUE	EQU	24
X509_ANY_STRING	EQU	<X509_NAME_VALUE>
X509_UNICODE_ANY_STRING	EQU	<X509_UNICODE_NAME_VALUE>
X509_OCTET_STRING	EQU	25
X509_BITS	EQU	26
X509_INTEGER	EQU	27
X509_MULTI_BYTE_INTEGER	EQU	28
X509_ENUMERATED	EQU	29
X509_CHOICE_OF_TIME	EQU	30
X509_AUTHORITY_KEY_ID2	EQU	31
X509_AUTHORITY_INFO_ACCESS	EQU	32
X509_CRL_REASON_CODE	EQU	<X509_ENUMERATED>
PKCS_CONTENT_INFO	EQU	33
X509_SEQUENCE_OF_ANY	EQU	34
X509_CRL_DIST_POINTS	EQU	35
X509_ENHANCED_KEY_USAGE	EQU	36
PKCS_CTL	EQU	37
X509_MULTI_BYTE_UINT	EQU	38
X509_DSS_PUBLICKEY	EQU	<X509_MULTI_BYTE_UINT>
X509_DSS_PARAMETERS	EQU	39
X509_DSS_SIGNATURE	EQU	40
PKCS_RC2_CBC_PARAMETERS	EQU	41
PKCS_SMIME_CAPABILITIES	EQU	42
PKCS_RSA_PRIVATE_KEY	EQU	43
PKCS_PRIVATE_KEY_INFO	EQU	44
PKCS_ENCRYPTED_PRIVATE_KEY_INFO	EQU	45
X509_PKIX_POLICY_QUALIFIER_USERNOTICE	EQU	46
X509_DH_PUBLICKEY	EQU	<X509_MULTI_BYTE_UINT>
X509_DH_PARAMETERS	EQU	47
PKCS_ATTRIBUTES	EQU	48
PKCS_SORTED_CTL	EQU	49
X942_DH_PARAMETERS	EQU	50
X509_BITS_WITHOUT_TRAILING_ZEROES	EQU	51
X942_OTHER_INFO	EQU	52
X509_CERT_PAIR	EQU	53
X509_ISSUING_DIST_POINT	EQU	54
X509_NAME_CONSTRAINTS	EQU	55
X509_POLICY_MAPPINGS	EQU	56
X509_POLICY_CONSTRAINTS	EQU	57
X509_CROSS_CERT_DIST_POINTS	EQU	58
CMC_DATA	EQU	59
CMC_RESPONSE	EQU	60
CMC_STATUS	EQU	61
CMC_ADD_EXTENSIONS	EQU	62
CMC_ADD_ATTRIBUTES	EQU	63
X509_CERTIFICATE_TEMPLATE	EQU	64
PKCS7_SIGNER_INFO	EQU	500
CMS_SIGNER_INFO	EQU	501
szOID_AUTHORITY_KEY_IDENTIFIER	EQU	<"2.5.29.1">
szOID_KEY_ATTRIBUTES	EQU	<"2.5.29.2">
szOID_CERT_POLICIES_95	EQU	<"2.5.29.3">
szOID_KEY_USAGE_RESTRICTION	EQU	<"2.5.29.4">
szOID_SUBJECT_ALT_NAME	EQU	<"2.5.29.7">
szOID_ISSUER_ALT_NAME	EQU	<"2.5.29.8">
szOID_BASIC_CONSTRAINTS	EQU	<"2.5.29.10">
szOID_KEY_USAGE	EQU	<"2.5.29.15">
szOID_PRIVATEKEY_USAGE_PERIOD	EQU	<"2.5.29.16">
szOID_BASIC_CONSTRAINTS2	EQU	<"2.5.29.19">
szOID_CERT_POLICIES	EQU	<"2.5.29.32">
szOID_ANY_CERT_POLICY	EQU	<"2.5.29.32.0">
szOID_AUTHORITY_KEY_IDENTIFIER2	EQU	<"2.5.29.35">
szOID_SUBJECT_KEY_IDENTIFIER	EQU	<"2.5.29.14">
szOID_SUBJECT_ALT_NAME2	EQU	<"2.5.29.17">
szOID_ISSUER_ALT_NAME2	EQU	<"2.5.29.18">
szOID_CRL_REASON_CODE	EQU	<"2.5.29.21">
szOID_REASON_CODE_HOLD	EQU	<"2.5.29.23">
szOID_CRL_DIST_POINTS	EQU	<"2.5.29.31">
szOID_ENHANCED_KEY_USAGE	EQU	<"2.5.29.37">
szOID_CRL_NUMBER	EQU	<"2.5.29.20">
szOID_DELTA_CRL_INDICATOR	EQU	<"2.5.29.27">
szOID_ISSUING_DIST_POINT	EQU	<"2.5.29.28">
szOID_FRESHEST_CRL	EQU	<"2.5.29.46">
szOID_NAME_CONSTRAINTS	EQU	<"2.5.29.30">
szOID_POLICY_MAPPINGS	EQU	<"2.5.29.33">
szOID_LEGACY_POLICY_MAPPINGS	EQU	<"2.5.29.5">
szOID_POLICY_CONSTRAINTS	EQU	<"2.5.29.36">
szOID_RENEWAL_CERTIFICATE	EQU	<"1.3.6.1.4.1.311.13.1">
szOID_ENROLLMENT_NAME_VALUE_PAIR	EQU	<"1.3.6.1.4.1.311.13.2.1">
szOID_ENROLLMENT_CSP_PROVIDER	EQU	<"1.3.6.1.4.1.311.13.2.2">
szOID_OS_VERSION	EQU	<"1.3.6.1.4.1.311.13.2.3">
szOID_ENROLLMENT_AGENT	EQU	<"1.3.6.1.4.1.311.20.2.1">
szOID_PKIX	EQU	<"1.3.6.1.5.5.7">
szOID_PKIX_PE	EQU	<"1.3.6.1.5.5.7.1">
szOID_AUTHORITY_INFO_ACCESS	EQU	<"1.3.6.1.5.5.7.1.1">
szOID_CERT_EXTENSIONS	EQU	<"1.3.6.1.4.1.311.2.1.14">
szOID_NEXT_UPDATE_LOCATION	EQU	<"1.3.6.1.4.1.311.10.2">
szOID_REMOVE_CERTIFICATE	EQU	<"1.3.6.1.4.1.311.10.8.1">
szOID_CROSS_CERT_DIST_POINTS	EQU	<"1.3.6.1.4.1.311.10.9.1">
szOID_CTL	EQU	<"1.3.6.1.4.1.311.10.1">
szOID_SORTED_CTL	EQU	<"1.3.6.1.4.1.311.10.1.1">
ifndef szOID_SERIALIZED
szOID_SERIALIZED	EQU	<"1.3.6.1.4.1.311.10.3.3.1">
endif 
ifndef szOID_NT_PRINCIPAL_NAME
szOID_NT_PRINCIPAL_NAME	EQU	<"1.3.6.1.4.1.311.20.2.3">
endif 
ifndef szOID_PRODUCT_UPDATE
szOID_PRODUCT_UPDATE	EQU	<"1.3.6.1.4.1.311.31.1">
endif 
szOID_ANY_APPLICATION_POLICY	EQU	<"1.3.6.1.4.1.311.10.12.1">
szOID_AUTO_ENROLL_CTL_USAGE	EQU	<"1.3.6.1.4.1.311.20.1">
szOID_ENROLL_CERTTYPE_EXTENSION	EQU	<"1.3.6.1.4.1.311.20.2">
szOID_CERT_MANIFOLD	EQU	<"1.3.6.1.4.1.311.20.3">
ifndef szOID_CERTSRV_CA_VERSION
szOID_CERTSRV_CA_VERSION	EQU	<"1.3.6.1.4.1.311.21.1">
endif 
szOID_CERTSRV_PREVIOUS_CERT_HASH	EQU	<"1.3.6.1.4.1.311.21.2">
szOID_CRL_VIRTUAL_BASE	EQU	<"1.3.6.1.4.1.311.21.3">
szOID_CRL_NEXT_PUBLISH	EQU	<"1.3.6.1.4.1.311.21.4">
szOID_KP_CA_EXCHANGE	EQU	<"1.3.6.1.4.1.311.21.5">
szOID_KP_KEY_RECOVERY_AGENT	EQU	<"1.3.6.1.4.1.311.21.6">
szOID_CERTIFICATE_TEMPLATE	EQU	<"1.3.6.1.4.1.311.21.7">
szOID_ENTERPRISE_OID_ROOT	EQU	<"1.3.6.1.4.1.311.21.8">
szOID_RDN_DUMMY_SIGNER	EQU	<"1.3.6.1.4.1.311.21.9">
szOID_APPLICATION_CERT_POLICIES	EQU	<"1.3.6.1.4.1.311.21.10">
szOID_APPLICATION_POLICY_MAPPINGS	EQU	<"1.3.6.1.4.1.311.21.11">
szOID_APPLICATION_POLICY_CONSTRAINTS	EQU	<"1.3.6.1.4.1.311.21.12">
szOID_ARCHIVED_KEY_ATTR	EQU	<"1.3.6.1.4.1.311.21.13">
szOID_CRL_SELF_CDP	EQU	<"1.3.6.1.4.1.311.21.14">
szOID_REQUIRE_CERT_CHAIN_POLICY	EQU	<"1.3.6.1.4.1.311.21.15">
szOID_ARCHIVED_KEY_CERT_HASH	EQU	<"1.3.6.1.4.1.311.21.16">
szOID_ISSUED_CERT_HASH	EQU	<"1.3.6.1.4.1.311.21.17">
szOID_DS_EMAIL_REPLICATION	EQU	<"1.3.6.1.4.1.311.21.19">
szOID_REQUEST_CLIENT_INFO	EQU	<"1.3.6.1.4.1.311.21.20">
szOID_ENCRYPTED_KEY_HASH	EQU	<"1.3.6.1.4.1.311.21.21">
szOID_NTDS_REPLICATION	EQU	<"1.3.6.1.4.1.311.25.1">
szOID_SUBJECT_DIR_ATTRS	EQU	<"2.5.29.9">
szOID_PKIX_KP	EQU	<"1.3.6.1.5.5.7.3">
szOID_PKIX_KP_SERVER_AUTH	EQU	<"1.3.6.1.5.5.7.3.1">
szOID_PKIX_KP_CLIENT_AUTH	EQU	<"1.3.6.1.5.5.7.3.2">
szOID_PKIX_KP_CODE_SIGNING	EQU	<"1.3.6.1.5.5.7.3.3">
szOID_PKIX_KP_EMAIL_PROTECTION	EQU	<"1.3.6.1.5.5.7.3.4">
szOID_PKIX_KP_IPSEC_END_SYSTEM	EQU	<"1.3.6.1.5.5.7.3.5">
szOID_PKIX_KP_IPSEC_TUNNEL	EQU	<"1.3.6.1.5.5.7.3.6">
szOID_PKIX_KP_IPSEC_USER	EQU	<"1.3.6.1.5.5.7.3.7">
szOID_PKIX_KP_TIMESTAMP_SIGNING	EQU	<"1.3.6.1.5.5.7.3.8">
szOID_IPSEC_KP_IKE_INTERMEDIATE	EQU	<"1.3.6.1.5.5.8.2.2">
szOID_KP_CTL_USAGE_SIGNING	EQU	<"1.3.6.1.4.1.311.10.3.1">
szOID_KP_TIME_STAMP_SIGNING	EQU	<"1.3.6.1.4.1.311.10.3.2">
ifndef szOID_SERVER_GATED_CRYPTO
szOID_SERVER_GATED_CRYPTO	EQU	<"1.3.6.1.4.1.311.10.3.3">
endif 
ifndef szOID_SGC_NETSCAPE
szOID_SGC_NETSCAPE	EQU	<"2.16.840.1.113730.4.1">
endif 
szOID_KP_EFS	EQU	<"1.3.6.1.4.1.311.10.3.4">
szOID_EFS_RECOVERY	EQU	<"1.3.6.1.4.1.311.10.3.4.1">
szOID_WHQL_CRYPTO	EQU	<"1.3.6.1.4.1.311.10.3.5">
szOID_NT5_CRYPTO	EQU	<"1.3.6.1.4.1.311.10.3.6">
szOID_OEM_WHQL_CRYPTO	EQU	<"1.3.6.1.4.1.311.10.3.7">
szOID_EMBEDDED_NT_CRYPTO	EQU	<"1.3.6.1.4.1.311.10.3.8">
szOID_ROOT_LIST_SIGNER	EQU	<"1.3.6.1.4.1.311.10.3.9">
szOID_KP_QUALIFIED_SUBORDINATION	EQU	<"1.3.6.1.4.1.311.10.3.10">
szOID_KP_KEY_RECOVERY	EQU	<"1.3.6.1.4.1.311.10.3.11">
szOID_KP_DOCUMENT_SIGNING	EQU	<"1.3.6.1.4.1.311.10.3.12">
szOID_KP_LIFETIME_SIGNING	EQU	<"1.3.6.1.4.1.311.10.3.13">
ifndef szOID_DRM
szOID_DRM	EQU	<"1.3.6.1.4.1.311.10.5.1">
endif 
ifndef szOID_DRM_INDIVIDUALIZATION
szOID_DRM_INDIVIDUALIZATION	EQU	<"1.3.6.1.4.1.311.10.5.2">
endif 
ifndef szOID_LICENSES
szOID_LICENSES	EQU	<"1.3.6.1.4.1.311.10.6.1">
endif 
ifndef szOID_LICENSE_SERVER
szOID_LICENSE_SERVER	EQU	<"1.3.6.1.4.1.311.10.6.2">
endif 
ifndef szOID_KP_SMARTCARD_LOGON
szOID_KP_SMARTCARD_LOGON	EQU	<"1.3.6.1.4.1.311.20.2.2">
endif 
szOID_YESNO_TRUST_ATTR	EQU	<"1.3.6.1.4.1.311.10.4.1">
szOID_PKIX_POLICY_QUALIFIER_CPS	EQU	<"1.3.6.1.5.5.7.2.1">
szOID_PKIX_POLICY_QUALIFIER_USERNOTICE	EQU	<"1.3.6.1.5.5.7.2.2">
szOID_CERT_POLICIES_95_QUALIFIER1	EQU	<"2.16.840.1.113733.1.7.1.1">
CERT_EXTENSIONS	struct 
cExtension	DWORD	?
rgExtension	PCERT_EXTENSION	?
CERT_EXTENSIONS	ends

PCERT_EXTENSIONS typedef ptr CERT_EXTENSIONS

CERT_UNICODE_RDN_ERR_INDEX_MASK	EQU	3FFh
CERT_UNICODE_RDN_ERR_INDEX_SHIFT	EQU	22
CERT_UNICODE_ATTR_ERR_INDEX_MASK	EQU	003Fh
CERT_UNICODE_ATTR_ERR_INDEX_SHIFT	EQU	16
CERT_UNICODE_VALUE_ERR_INDEX_MASK	EQU	0000FFFFh
CERT_UNICODE_VALUE_ERR_INDEX_SHIFT	EQU	0
GET_CERT_UNICODE_RDN_ERR_INDEX macro X
	exitm <( ( X  shr  CERT_UNICODE_RDN_ERR_INDEX_SHIFT )  and  CERT_UNICODE_RDN_ERR_INDEX_MASK ) >
	endm
GET_CERT_UNICODE_ATTR_ERR_INDEX macro X
	exitm <( ( X  shr  CERT_UNICODE_ATTR_ERR_INDEX_SHIFT )  and  CERT_UNICODE_ATTR_ERR_INDEX_MASK ) >
	endm
GET_CERT_UNICODE_VALUE_ERR_INDEX macro X
	exitm <( X  and  CERT_UNICODE_VALUE_ERR_INDEX_MASK ) >
	endm
CERT_AUTHORITY_KEY_ID_INFO	struct 
KeyId	CRYPT_DATA_BLOB	<>
CertIssuer	CERT_NAME_BLOB	<>
CertSerialNumber	CRYPT_INTEGER_BLOB	<>
CERT_AUTHORITY_KEY_ID_INFO	ends

PCERT_AUTHORITY_KEY_ID_INFO typedef ptr CERT_AUTHORITY_KEY_ID_INFO

CERT_PRIVATE_KEY_VALIDITY	struct 
NotBefore	FILETIME	<>
NotAfter	FILETIME	<>
CERT_PRIVATE_KEY_VALIDITY	ends

PCERT_PRIVATE_KEY_VALIDITY typedef ptr CERT_PRIVATE_KEY_VALIDITY

CERT_KEY_ATTRIBUTES_INFO	struct 
KeyId	CRYPT_DATA_BLOB	<>
IntendedKeyUsage	CRYPT_BIT_BLOB	<>
pPrivateKeyUsagePeriod	PCERT_PRIVATE_KEY_VALIDITY	?
CERT_KEY_ATTRIBUTES_INFO	ends

PCERT_KEY_ATTRIBUTES_INFO typedef ptr CERT_KEY_ATTRIBUTES_INFO

CERT_DIGITAL_SIGNATURE_KEY_USAGE	EQU	80h
CERT_NON_REPUDIATION_KEY_USAGE	EQU	40h
CERT_KEY_ENCIPHERMENT_KEY_USAGE	EQU	20h
CERT_DATA_ENCIPHERMENT_KEY_USAGE	EQU	10h
CERT_KEY_AGREEMENT_KEY_USAGE	EQU	08h
CERT_KEY_CERT_SIGN_KEY_USAGE	EQU	04h
CERT_OFFLINE_CRL_SIGN_KEY_USAGE	EQU	02h
CERT_CRL_SIGN_KEY_USAGE	EQU	02h
CERT_ENCIPHER_ONLY_KEY_USAGE	EQU	01h
CERT_DECIPHER_ONLY_KEY_USAGE	EQU	80h
CERT_POLICY_ID	struct 
cCertPolicyElementId	DWORD	?
rgpszCertPolicyElementId	DWORD	?
CERT_POLICY_ID	ends

PCERT_POLICY_ID typedef ptr CERT_POLICY_ID

CERT_KEY_USAGE_RESTRICTION_INFO	struct 
cCertPolicyId	DWORD	?
rgCertPolicyId	PCERT_POLICY_ID	?
RestrictedKeyUsage	CRYPT_BIT_BLOB	<>
CERT_KEY_USAGE_RESTRICTION_INFO	ends

PCERT_KEY_USAGE_RESTRICTION_INFO typedef ptr CERT_KEY_USAGE_RESTRICTION_INFO

CERT_OTHER_NAME	struct 
pszObjId	LPSTR	?
Value	CRYPT_OBJID_BLOB	<>
CERT_OTHER_NAME	ends

PCERT_OTHER_NAME typedef ptr CERT_OTHER_NAME

CERT_ALT_NAME_ENTRY	struct 
dwAltNameChoice	DWORD	?
union
pOtherName	PCERT_OTHER_NAME	?
pwszRfc822Name	LPWSTR	?
pwszDNSName	LPWSTR	?
DirectoryName	CERT_NAME_BLOB	<>
pwszURL	LPWSTR	?
IPAddress	CRYPT_DATA_BLOB	<>
pszRegisteredID	LPSTR	?
ends
CERT_ALT_NAME_ENTRY	ends

PCERT_ALT_NAME_ENTRY typedef ptr CERT_ALT_NAME_ENTRY

CERT_ALT_NAME_OTHER_NAME	EQU	1
CERT_ALT_NAME_RFC822_NAME	EQU	2
CERT_ALT_NAME_DNS_NAME	EQU	3
CERT_ALT_NAME_X400_ADDRESS	EQU	4
CERT_ALT_NAME_DIRECTORY_NAME	EQU	5
CERT_ALT_NAME_EDI_PARTY_NAME	EQU	6
CERT_ALT_NAME_URL	EQU	7
CERT_ALT_NAME_IP_ADDRESS	EQU	8
CERT_ALT_NAME_REGISTERED_ID	EQU	9
CERT_ALT_NAME_INFO	struct 
cAltEntry	DWORD	?
rgAltEntry	PCERT_ALT_NAME_ENTRY	?
CERT_ALT_NAME_INFO	ends

PCERT_ALT_NAME_INFO typedef ptr CERT_ALT_NAME_INFO

CERT_ALT_NAME_ENTRY_ERR_INDEX_MASK	EQU	0FFh
CERT_ALT_NAME_ENTRY_ERR_INDEX_SHIFT	EQU	16
CERT_ALT_NAME_VALUE_ERR_INDEX_MASK	EQU	0000FFFFh
CERT_ALT_NAME_VALUE_ERR_INDEX_SHIFT	EQU	0
GET_CERT_ALT_NAME_ENTRY_ERR_INDEX macro X
	exitm <( ( X  shr  CERT_ALT_NAME_ENTRY_ERR_INDEX_SHIFT )  and  CERT_ALT_NAME_ENTRY_ERR_INDEX_MASK ) >
	endm
GET_CERT_ALT_NAME_VALUE_ERR_INDEX macro X
	exitm <( X  and  CERT_ALT_NAME_VALUE_ERR_INDEX_MASK ) >
	endm
CERT_BASIC_CONSTRAINTS_INFO	struct 
SubjectType	CRYPT_BIT_BLOB	<>
fPathLenConstraint	BOOL	?
dwPathLenConstraint	DWORD	?
cSubtreesConstraint	DWORD	?
rgSubtreesConstraint	DWORD	?
CERT_BASIC_CONSTRAINTS_INFO	ends

PCERT_BASIC_CONSTRAINTS_INFO typedef ptr CERT_BASIC_CONSTRAINTS_INFO

CERT_CA_SUBJECT_FLAG	EQU	80h
CERT_END_ENTITY_SUBJECT_FLAG	EQU	40h
CERT_BASIC_CONSTRAINTS2_INFO	struct 
fCA	BOOL	?
fPathLenConstraint	BOOL	?
dwPathLenConstraint	DWORD	?
CERT_BASIC_CONSTRAINTS2_INFO	ends

PCERT_BASIC_CONSTRAINTS2_INFO typedef ptr CERT_BASIC_CONSTRAINTS2_INFO

CERT_POLICY_QUALIFIER_INFO	struct 
pszPolicyQualifierId	LPSTR	?
Qualifier	CRYPT_OBJID_BLOB	<>
CERT_POLICY_QUALIFIER_INFO	ends

PCERT_POLICY_QUALIFIER_INFO typedef ptr CERT_POLICY_QUALIFIER_INFO

CERT_POLICY_INFO	struct 
pszPolicyIdentifier	LPSTR	?
cPolicyQualifier	DWORD	?
rgPolicyQualifier	DWORD	?
CERT_POLICY_INFO	ends

PCERT_POLICY_INFO typedef ptr CERT_POLICY_INFO

CERT_POLICIES_INFO	struct 
cPolicyInfo	DWORD	?
rgPolicyInfo	DWORD	?
CERT_POLICIES_INFO	ends

PCERT_POLICIES_INFO typedef ptr CERT_POLICIES_INFO

CERT_POLICY_QUALIFIER_NOTICE_REFERENCE	struct 
pszOrganization	LPSTR	?
cNoticeNumbers	DWORD	?
rgNoticeNumbers	DWORD	?
CERT_POLICY_QUALIFIER_NOTICE_REFERENCE	ends

PCERT_POLICY_QUALIFIER_NOTICE_REFERENCE typedef ptr CERT_POLICY_QUALIFIER_NOTICE_REFERENCE

CERT_POLICY_QUALIFIER_USER_NOTICE	struct 
pNoticeReference	DWORD	?
pszDisplayText	LPWSTR	?
CERT_POLICY_QUALIFIER_USER_NOTICE	ends

PCERT_POLICY_QUALIFIER_USER_NOTICE typedef ptr CERT_POLICY_QUALIFIER_USER_NOTICE

CPS_URLS	struct 
pszURL	LPWSTR	?
pAlgorithm	DWORD	?
pDigest	DWORD	?
CPS_URLS	ends

PCPS_URLS typedef ptr CPS_URLS

CERT_POLICY95_QUALIFIER1	struct 
pszPracticesReference	LPWSTR	?
pszNoticeIdentifier	LPSTR	?
pszNSINoticeIdentifier	LPSTR	?
cCPSURLs	DWORD	?
rgCPSURLs	DWORD	?
CERT_POLICY95_QUALIFIER1	ends

PCERT_POLICY95_QUALIFIER1 typedef ptr CERT_POLICY95_QUALIFIER1

CERT_POLICY_MAPPING	struct 
pszIssuerDomainPolicy	LPSTR	?
pszSubjectDomainPolicy	LPSTR	?
CERT_POLICY_MAPPING	ends

PCERT_POLICY_MAPPING typedef ptr CERT_POLICY_MAPPING

CERT_POLICY_MAPPINGS_INFO	struct 
cPolicyMapping	DWORD	?
rgPolicyMapping	PCERT_POLICY_MAPPING	?
CERT_POLICY_MAPPINGS_INFO	ends

PCERT_POLICY_MAPPINGS_INFO typedef ptr CERT_POLICY_MAPPINGS_INFO

CERT_POLICY_CONSTRAINTS_INFO	struct 
fRequireExplicitPolicy	BOOL	?
dwRequireExplicitPolicySkipCerts	DWORD	?
fInhibitPolicyMapping	BOOL	?
dwInhibitPolicyMappingSkipCerts	DWORD	?
CERT_POLICY_CONSTRAINTS_INFO	ends

PCERT_POLICY_CONSTRAINTS_INFO typedef ptr CERT_POLICY_CONSTRAINTS_INFO

CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY	struct 
pszObjId	LPSTR	?
cValue	DWORD	?
rgValue	PCRYPT_DER_BLOB	?
CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY	ends

PCRYPT_CONTENT_INFO_SEQUENCE_OF_ANY typedef ptr CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY

CRYPT_CONTENT_INFO	struct 
pszObjId	LPSTR	?
Content	CRYPT_DER_BLOB	<>
CRYPT_CONTENT_INFO	ends

PCRYPT_CONTENT_INFO typedef ptr CRYPT_CONTENT_INFO

CRYPT_SEQUENCE_OF_ANY	struct 
cValue	DWORD	?
rgValue	PCRYPT_DER_BLOB	?
CRYPT_SEQUENCE_OF_ANY	ends

PCRYPT_SEQUENCE_OF_ANY typedef ptr CRYPT_SEQUENCE_OF_ANY

CERT_AUTHORITY_KEY_ID2_INFO	struct 
KeyId	CRYPT_DATA_BLOB	<>
AuthorityCertIssuer	CERT_ALT_NAME_INFO	<>
AuthorityCertSerialNumber	CRYPT_INTEGER_BLOB	<>
CERT_AUTHORITY_KEY_ID2_INFO	ends

PCERT_AUTHORITY_KEY_ID2_INFO typedef ptr CERT_AUTHORITY_KEY_ID2_INFO

CERT_ACCESS_DESCRIPTION	struct 
pszAccessMethod	LPSTR	?
AccessLocation	CERT_ALT_NAME_ENTRY	<>
CERT_ACCESS_DESCRIPTION	ends

PCERT_ACCESS_DESCRIPTION typedef ptr CERT_ACCESS_DESCRIPTION

CERT_AUTHORITY_INFO_ACCESS	struct 
cAccDescr	DWORD	?
rgAccDescr	PCERT_ACCESS_DESCRIPTION	?
CERT_AUTHORITY_INFO_ACCESS	ends

PCERT_AUTHORITY_INFO_ACCESS typedef ptr CERT_AUTHORITY_INFO_ACCESS

szOID_PKIX_ACC_DESCR	EQU	<"1.3.6.1.5.5.7.48">
szOID_PKIX_OCSP	EQU	<"1.3.6.1.5.5.7.48.1">
szOID_PKIX_CA_ISSUERS	EQU	<"1.3.6.1.5.5.7.48.2">
CRL_REASON_UNSPECIFIED	EQU	0
CRL_REASON_KEY_COMPROMISE	EQU	1
CRL_REASON_CA_COMPROMISE	EQU	2
CRL_REASON_AFFILIATION_CHANGED	EQU	3
CRL_REASON_SUPERSEDED	EQU	4
CRL_REASON_CESSATION_OF_OPERATION	EQU	5
CRL_REASON_CERTIFICATE_HOLD	EQU	6
CRL_REASON_REMOVE_FROM_CRL	EQU	8
CRL_DIST_POINT_NAME	struct 
dwDistPointNameChoice	DWORD	?
union
FullName	CERT_ALT_NAME_INFO	<>
ends
CRL_DIST_POINT_NAME	ends

PCRL_DIST_POINT_NAME typedef ptr CRL_DIST_POINT_NAME

CRL_DIST_POINT_NO_NAME	EQU	0
CRL_DIST_POINT_FULL_NAME	EQU	1
CRL_DIST_POINT_ISSUER_RDN_NAME	EQU	2
CRL_DIST_POINT	struct 
DistPointName	CRL_DIST_POINT_NAME	<>
ReasonFlags	CRYPT_BIT_BLOB	<>
CRLIssuer	CERT_ALT_NAME_INFO	<>
CRL_DIST_POINT	ends

PCRL_DIST_POINT typedef ptr CRL_DIST_POINT

CRL_REASON_UNUSED_FLAG	EQU	80h
CRL_REASON_KEY_COMPROMISE_FLAG	EQU	40h
CRL_REASON_CA_COMPROMISE_FLAG	EQU	20h
CRL_REASON_AFFILIATION_CHANGED_FLAG	EQU	10h
CRL_REASON_SUPERSEDED_FLAG	EQU	08h
CRL_REASON_CESSATION_OF_OPERATION_FLAG	EQU	04h
CRL_REASON_CERTIFICATE_HOLD_FLAG	EQU	02h
CRL_DIST_POINTS_INFO	struct 
cDistPoint	DWORD	?
rgDistPoint	PCRL_DIST_POINT	?
CRL_DIST_POINTS_INFO	ends

PCRL_DIST_POINTS_INFO typedef ptr CRL_DIST_POINTS_INFO

CRL_DIST_POINT_ERR_INDEX_MASK	EQU	7Fh
CRL_DIST_POINT_ERR_INDEX_SHIFT	EQU	24
GET_CRL_DIST_POINT_ERR_INDEX macro X
	exitm <( ( X  shr  CRL_DIST_POINT_ERR_INDEX_SHIFT )  and  CRL_DIST_POINT_ERR_INDEX_MASK ) >
	endm
CRL_DIST_POINT_ERR_CRL_ISSUER_BIT	EQU	80000000h
IS_CRL_DIST_POINT_ERR_CRL_ISSUER macro X
	exitm <( 0 != ( X  and  CRL_DIST_POINT_ERR_CRL_ISSUER_BIT ) ) >
	endm
CROSS_CERT_DIST_POINTS_INFO	struct 
dwSyncDeltaTime	DWORD	?
cDistPoint	DWORD	?
rgDistPoint	PCERT_ALT_NAME_INFO	?
CROSS_CERT_DIST_POINTS_INFO	ends

PCROSS_CERT_DIST_POINTS_INFO typedef ptr CROSS_CERT_DIST_POINTS_INFO

CROSS_CERT_DIST_POINT_ERR_INDEX_MASK	EQU	0FFh
CROSS_CERT_DIST_POINT_ERR_INDEX_SHIFT	EQU	24
GET_CROSS_CERT_DIST_POINT_ERR_INDEX macro X
	exitm <( ( X  shr  CROSS_CERT_DIST_POINT_ERR_INDEX_SHIFT )  and  CROSS_CERT_DIST_POINT_ERR_INDEX_MASK ) >
	endm
CERT_PAIR	struct 
Forward	CERT_BLOB	<>
Reverse	CERT_BLOB	<>
CERT_PAIR	ends

PCERT_PAIR typedef ptr CERT_PAIR

CRL_ISSUING_DIST_POINT	struct 
DistPointName	CRL_DIST_POINT_NAME	<>
fOnlyContainsUserCerts	BOOL	?
fOnlyContainsCACerts	BOOL	?
OnlySomeReasonFlags	CRYPT_BIT_BLOB	<>
fIndirectCRL	BOOL	?
CRL_ISSUING_DIST_POINT	ends

PCRL_ISSUING_DIST_POINT typedef ptr CRL_ISSUING_DIST_POINT

CERT_GENERAL_SUBTREE	struct 
Base	CERT_ALT_NAME_ENTRY	<>
dwMinimum	DWORD	?
fMaximum	BOOL	?
dwMaximum	DWORD	?
CERT_GENERAL_SUBTREE	ends

PCERT_GENERAL_SUBTREE typedef ptr CERT_GENERAL_SUBTREE

CERT_NAME_CONSTRAINTS_INFO	struct 
cPermittedSubtree	DWORD	?
rgPermittedSubtree	PCERT_GENERAL_SUBTREE	?
cExcludedSubtree	DWORD	?
rgExcludedSubtree	PCERT_GENERAL_SUBTREE	?
CERT_NAME_CONSTRAINTS_INFO	ends

PCERT_NAME_CONSTRAINTS_INFO typedef ptr CERT_NAME_CONSTRAINTS_INFO

CERT_EXCLUDED_SUBTREE_BIT	EQU	80000000h
IS_CERT_EXCLUDED_SUBTREE macro X
	exitm <( 0 != ( X  and  CERT_EXCLUDED_SUBTREE_BIT ) ) >
	endm
SORTED_CTL_EXT_FLAGS_OFFSET	EQU	( 0 * 4 )
SORTED_CTL_EXT_COUNT_OFFSET	EQU	( 1 * 4 )
SORTED_CTL_EXT_MAX_COLLISION_OFFSET	EQU	( 2 * 4 )
SORTED_CTL_EXT_HASH_BUCKET_OFFSET	EQU	( 3 * 4 )
SORTED_CTL_EXT_HASHED_SUBJECT_IDENTIFIER_FLAG	EQU	1h
CERT_DSS_PARAMETERS	struct 
p	CRYPT_UINT_BLOB	<>
q	CRYPT_UINT_BLOB	<>
g	CRYPT_UINT_BLOB	<>
CERT_DSS_PARAMETERS	ends

PCERT_DSS_PARAMETERS typedef ptr CERT_DSS_PARAMETERS

CERT_DSS_R_LEN	EQU	20
CERT_DSS_S_LEN	EQU	20
CERT_DSS_SIGNATURE_LEN	EQU	( CERT_DSS_R_LEN + CERT_DSS_S_LEN )
CERT_MAX_ASN_ENCODED_DSS_SIGNATURE_LEN	EQU	( 2 + 2 * ( 2 + 20 + 1 ) )
CERT_DH_PARAMETERS	struct 
p	CRYPT_UINT_BLOB	<>
g	CRYPT_UINT_BLOB	<>
CERT_DH_PARAMETERS	ends

PCERT_DH_PARAMETERS typedef ptr CERT_DH_PARAMETERS

CERT_X942_DH_VALIDATION_PARAMS	struct 
seed	CRYPT_BIT_BLOB	<>
pgenCounter	DWORD	?
CERT_X942_DH_VALIDATION_PARAMS	ends

PCERT_X942_DH_VALIDATION_PARAMS typedef ptr CERT_X942_DH_VALIDATION_PARAMS

CERT_X942_DH_PARAMETERS	struct 
p	CRYPT_UINT_BLOB	<>
g	CRYPT_UINT_BLOB	<>
q	CRYPT_UINT_BLOB	<>
j	CRYPT_UINT_BLOB	<>
pValidationParams	PCERT_X942_DH_VALIDATION_PARAMS	?
CERT_X942_DH_PARAMETERS	ends

PCERT_X942_DH_PARAMETERS typedef ptr CERT_X942_DH_PARAMETERS

CRYPT_X942_COUNTER_BYTE_LENGTH	EQU	4
CRYPT_X942_KEY_LENGTH_BYTE_LENGTH	EQU	4
CRYPT_X942_PUB_INFO_BYTE_LENGTH	EQU	( 512 / 8 )
CRYPT_X942_OTHER_INFO	struct 
pszContentEncryptionObjId	LPSTR	?
rgbCounter	BYTE CRYPT_X942_COUNTER_BYTE_LENGTH dup (?)
rgbKeyLength	BYTE CRYPT_X942_KEY_LENGTH_BYTE_LENGTH dup (?)
PubInfo	CRYPT_DATA_BLOB	<>
CRYPT_X942_OTHER_INFO	ends

PCRYPT_X942_OTHER_INFO typedef ptr CRYPT_X942_OTHER_INFO

CRYPT_RC2_CBC_PARAMETERS	struct 
dwVersion	DWORD	?
fIV	BOOL	?
rgbIV	BYTE 8 dup (?)
CRYPT_RC2_CBC_PARAMETERS	ends

PCRYPT_RC2_CBC_PARAMETERS typedef ptr CRYPT_RC2_CBC_PARAMETERS

CRYPT_RC2_40BIT_VERSION	EQU	160
CRYPT_RC2_56BIT_VERSION	EQU	52
CRYPT_RC2_64BIT_VERSION	EQU	120
CRYPT_RC2_128BIT_VERSION	EQU	58
CRYPT_SMIME_CAPABILITY	struct 
pszObjId	LPSTR	?
Parameters	CRYPT_OBJID_BLOB	<>
CRYPT_SMIME_CAPABILITY	ends

PCRYPT_SMIME_CAPABILITY typedef ptr CRYPT_SMIME_CAPABILITY

CRYPT_SMIME_CAPABILITIES	struct 
cCapability	DWORD	?
rgCapability	PCRYPT_SMIME_CAPABILITY	?
CRYPT_SMIME_CAPABILITIES	ends

PCRYPT_SMIME_CAPABILITIES typedef ptr CRYPT_SMIME_CAPABILITIES

szOID_VERISIGN_PRIVATE_6_9	EQU	<"2.16.840.1.113733.1.6.9">
szOID_VERISIGN_ONSITE_JURISDICTION_HASH	EQU	<"2.16.840.1.113733.1.6.11">
szOID_VERISIGN_BITSTRING_6_13	EQU	<"2.16.840.1.113733.1.6.13">
szOID_VERISIGN_ISS_STRONG_CRYPTO	EQU	<"2.16.840.1.113733.1.8.1">
szOID_NETSCAPE	EQU	<"2.16.840.1.113730">
szOID_NETSCAPE_CERT_EXTENSION	EQU	<"2.16.840.1.113730.1">
szOID_NETSCAPE_CERT_TYPE	EQU	<"2.16.840.1.113730.1.1">
szOID_NETSCAPE_BASE_URL	EQU	<"2.16.840.1.113730.1.2">
szOID_NETSCAPE_REVOCATION_URL	EQU	<"2.16.840.1.113730.1.3">
szOID_NETSCAPE_CA_REVOCATION_URL	EQU	<"2.16.840.1.113730.1.4">
szOID_NETSCAPE_CERT_RENEWAL_URL	EQU	<"2.16.840.1.113730.1.7">
szOID_NETSCAPE_CA_POLICY_URL	EQU	<"2.16.840.1.113730.1.8">
szOID_NETSCAPE_SSL_SERVER_NAME	EQU	<"2.16.840.1.113730.1.12">
szOID_NETSCAPE_COMMENT	EQU	<"2.16.840.1.113730.1.13">
szOID_NETSCAPE_DATA_TYPE	EQU	<"2.16.840.1.113730.2">
szOID_NETSCAPE_CERT_SEQUENCE	EQU	<"2.16.840.1.113730.2.5">
NETSCAPE_SSL_CLIENT_AUTH_CERT_TYPE	EQU	80h
NETSCAPE_SSL_SERVER_AUTH_CERT_TYPE	EQU	40h
NETSCAPE_SMIME_CERT_TYPE	EQU	20h
NETSCAPE_SIGN_CERT_TYPE	EQU	10h
NETSCAPE_SSL_CA_CERT_TYPE	EQU	04h
NETSCAPE_SMIME_CA_CERT_TYPE	EQU	02h
NETSCAPE_SIGN_CA_CERT_TYPE	EQU	01h
szOID_CT_PKI_DATA	EQU	<"1.3.6.1.5.5.7.12.2">
szOID_CT_PKI_RESPONSE	EQU	<"1.3.6.1.5.5.7.12.3">
szOID_PKIX_NO_SIGNATURE	EQU	<"1.3.6.1.5.5.7.6.2">
szOID_CMC	EQU	<"1.3.6.1.5.5.7.7">
szOID_CMC_STATUS_INFO	EQU	<"1.3.6.1.5.5.7.7.1">
szOID_CMC_IDENTIFICATION	EQU	<"1.3.6.1.5.5.7.7.2">
szOID_CMC_IDENTITY_PROOF	EQU	<"1.3.6.1.5.5.7.7.3">
szOID_CMC_DATA_RETURN	EQU	<"1.3.6.1.5.5.7.7.4">
szOID_CMC_TRANSACTION_ID	EQU	<"1.3.6.1.5.5.7.7.5">
szOID_CMC_SENDER_NONCE	EQU	<"1.3.6.1.5.5.7.7.6">
szOID_CMC_RECIPIENT_NONCE	EQU	<"1.3.6.1.5.5.7.7.7">
szOID_CMC_ADD_EXTENSIONS	EQU	<"1.3.6.1.5.5.7.7.8">
szOID_CMC_ENCRYPTED_POP	EQU	<"1.3.6.1.5.5.7.7.9">
szOID_CMC_DECRYPTED_POP	EQU	<"1.3.6.1.5.5.7.7.10">
szOID_CMC_LRA_POP_WITNESS	EQU	<"1.3.6.1.5.5.7.7.11">
szOID_CMC_GET_CERT	EQU	<"1.3.6.1.5.5.7.7.15">
szOID_CMC_GET_CRL	EQU	<"1.3.6.1.5.5.7.7.16">
szOID_CMC_REVOKE_REQUEST	EQU	<"1.3.6.1.5.5.7.7.17">
szOID_CMC_REG_INFO	EQU	<"1.3.6.1.5.5.7.7.18">
szOID_CMC_RESPONSE_INFO	EQU	<"1.3.6.1.5.5.7.7.19">
szOID_CMC_QUERY_PENDING	EQU	<"1.3.6.1.5.5.7.7.21">
szOID_CMC_ID_POP_LINK_RANDOM	EQU	<"1.3.6.1.5.5.7.7.22">
szOID_CMC_ID_POP_LINK_WITNESS	EQU	<"1.3.6.1.5.5.7.7.23">
szOID_CMC_ID_CONFIRM_CERT_ACCEPTANCE	EQU	<"1.3.6.1.5.5.7.7.24">
szOID_CMC_ADD_ATTRIBUTES	EQU	<"1.3.6.1.4.1.311.10.10.1">
CMC_TAGGED_ATTRIBUTE	struct 
dwBodyPartID	DWORD	?
Attribute	CRYPT_ATTRIBUTE	<>
CMC_TAGGED_ATTRIBUTE	ends

PCMC_TAGGED_ATTRIBUTE typedef ptr CMC_TAGGED_ATTRIBUTE

CMC_TAGGED_CERT_REQUEST	struct 
dwBodyPartID	DWORD	?
SignedCertRequest	CRYPT_DER_BLOB	<>
CMC_TAGGED_CERT_REQUEST	ends

PCMC_TAGGED_CERT_REQUEST typedef ptr CMC_TAGGED_CERT_REQUEST

CMC_TAGGED_REQUEST	struct 
dwTaggedRequestChoice	DWORD	?
union
pTaggedCertRequest	PCMC_TAGGED_CERT_REQUEST	?
ends
CMC_TAGGED_REQUEST	ends

PCMC_TAGGED_REQUEST typedef ptr CMC_TAGGED_REQUEST

CMC_TAGGED_CERT_REQUEST_CHOICE	EQU	1
CMC_TAGGED_CONTENT_INFO	struct 
dwBodyPartID	DWORD	?
EncodedContentInfo	CRYPT_DER_BLOB	<>
CMC_TAGGED_CONTENT_INFO	ends

PCMC_TAGGED_CONTENT_INFO typedef ptr CMC_TAGGED_CONTENT_INFO

CMC_TAGGED_OTHER_MSG	struct 
dwBodyPartID	DWORD	?
pszObjId	LPSTR	?
Value	CRYPT_OBJID_BLOB	<>
CMC_TAGGED_OTHER_MSG	ends

PCMC_TAGGED_OTHER_MSG typedef ptr CMC_TAGGED_OTHER_MSG

CMC_DATA_INFO	struct 
cTaggedAttribute	DWORD	?
rgTaggedAttribute	PCMC_TAGGED_ATTRIBUTE	?
cTaggedRequest	DWORD	?
rgTaggedRequest	PCMC_TAGGED_REQUEST	?
cTaggedContentInfo	DWORD	?
rgTaggedContentInfo	PCMC_TAGGED_CONTENT_INFO	?
cTaggedOtherMsg	DWORD	?
rgTaggedOtherMsg	PCMC_TAGGED_OTHER_MSG	?
CMC_DATA_INFO	ends

PCMC_DATA_INFO typedef ptr CMC_DATA_INFO

CMC_RESPONSE_INFO	struct 
cTaggedAttribute	DWORD	?
rgTaggedAttribute	PCMC_TAGGED_ATTRIBUTE	?
cTaggedContentInfo	DWORD	?
rgTaggedContentInfo	PCMC_TAGGED_CONTENT_INFO	?
cTaggedOtherMsg	DWORD	?
rgTaggedOtherMsg	PCMC_TAGGED_OTHER_MSG	?
CMC_RESPONSE_INFO	ends

PCMC_RESPONSE_INFO typedef ptr CMC_RESPONSE_INFO

CMC_PEND_INFO	struct 
PendToken	CRYPT_DATA_BLOB	<>
PendTime	FILETIME	<>
CMC_PEND_INFO	ends

PCMC_PEND_INFO typedef ptr CMC_PEND_INFO

CMC_STATUS_INFO	struct 
dwStatus	DWORD	?
cBodyList	DWORD	?
rgdwBodyList	DWORD	?
pwszStatusString	LPWSTR	?
dwOtherInfoChoice	DWORD	?
union
dwFailInfo	DWORD	?
pPendInfo	PCMC_PEND_INFO	?
ends
CMC_STATUS_INFO	ends

PCMC_STATUS_INFO typedef ptr CMC_STATUS_INFO

CMC_OTHER_INFO_NO_CHOICE	EQU	0
CMC_OTHER_INFO_FAIL_CHOICE	EQU	1
CMC_OTHER_INFO_PEND_CHOICE	EQU	2
CMC_STATUS_SUCCESS	EQU	0
CMC_STATUS_FAILED	EQU	2
CMC_STATUS_PENDING	EQU	3
CMC_STATUS_NO_SUPPORT	EQU	4
CMC_STATUS_CONFIRM_REQUIRED	EQU	5
CMC_FAIL_BAD_ALG	EQU	0
CMC_FAIL_BAD_MESSAGE_CHECK	EQU	1
CMC_FAIL_BAD_REQUEST	EQU	2
CMC_FAIL_BAD_TIME	EQU	3
CMC_FAIL_BAD_CERT_ID	EQU	4
CMC_FAIL_UNSUPORTED_EXT	EQU	5
CMC_FAIL_MUST_ARCHIVE_KEYS	EQU	6
CMC_FAIL_BAD_IDENTITY	EQU	7
CMC_FAIL_POP_REQUIRED	EQU	8
CMC_FAIL_POP_FAILED	EQU	9
CMC_FAIL_NO_KEY_REUSE	EQU	10
CMC_FAIL_INTERNAL_CA_ERROR	EQU	11
CMC_FAIL_TRY_LATER	EQU	12
CMC_ADD_EXTENSIONS_INFO	struct 
dwCmcDataReference	DWORD	?
cCertReference	DWORD	?
rgdwCertReference	DWORD	?
cExtension	DWORD	?
rgExtension	PCERT_EXTENSION	?
CMC_ADD_EXTENSIONS_INFO	ends

PCMC_ADD_EXTENSIONS_INFO typedef ptr CMC_ADD_EXTENSIONS_INFO

CMC_ADD_ATTRIBUTES_INFO	struct 
dwCmcDataReference	DWORD	?
cCertReference	DWORD	?
rgdwCertReference	DWORD	?
cAttribute	DWORD	?
rgAttribute	PCRYPT_ATTRIBUTE	?
CMC_ADD_ATTRIBUTES_INFO	ends

PCMC_ADD_ATTRIBUTES_INFO typedef ptr CMC_ADD_ATTRIBUTES_INFO

CERT_TEMPLATE_EXT	struct 
pszObjId	LPSTR	?
dwMajorVersion	DWORD	?
fMinorVersion	BOOL	?
dwMinorVersion	DWORD	?
CERT_TEMPLATE_EXT	ends

PCERT_TEMPLATE_EXT typedef ptr CERT_TEMPLATE_EXT

HCRYPTOIDFUNCSET typedef ptr 
HCRYPTOIDFUNCADDR typedef ptr 
CRYPT_OID_ENCODE_OBJECT_FUNC	EQU	<"CryptDllEncodeObject">
CRYPT_OID_DECODE_OBJECT_FUNC	EQU	<"CryptDllDecodeObject">
CRYPT_OID_ENCODE_OBJECT_EX_FUNC	EQU	<"CryptDllEncodeObjectEx">
CRYPT_OID_DECODE_OBJECT_EX_FUNC	EQU	<"CryptDllDecodeObjectEx">
CRYPT_OID_CREATE_COM_OBJECT_FUNC	EQU	<"CryptDllCreateCOMObject">
CRYPT_OID_VERIFY_REVOCATION_FUNC	EQU	<"CertDllVerifyRevocation">
CRYPT_OID_VERIFY_CTL_USAGE_FUNC	EQU	<"CertDllVerifyCTLUsage">
CRYPT_OID_FORMAT_OBJECT_FUNC	EQU	<"CryptDllFormatObject">
CRYPT_OID_FIND_OID_INFO_FUNC	EQU	<"CryptDllFindOIDInfo">
CRYPT_OID_FIND_LOCALIZED_NAME_FUNC	EQU	<"CryptDllFindLocalizedName">
CRYPT_OID_REGPATH	EQU	<"Software\Microsoft\Cryptography\OID">
CRYPT_OID_REG_ENCODING_TYPE_PREFIX	EQU	<"EncodingType ">
CRYPT_OID_REG_DLL_VALUE_NAME	EQU	<L("Dll")>
CRYPT_OID_REG_FUNC_NAME_VALUE_NAME	EQU	<L("FuncName")>
CRYPT_OID_REG_FUNC_NAME_VALUE_NAME_A	EQU	<"FuncName">
CRYPT_OID_REG_FLAGS_VALUE_NAME	EQU	<L("CryptFlags")>
CRYPT_DEFAULT_OID	EQU	<"DEFAULT">
CRYPT_OID_FUNC_ENTRY	struct 
pszOID	LPSTR	?
pvFuncAddr	DWORD	?
CRYPT_OID_FUNC_ENTRY	ends

PCRYPT_OID_FUNC_ENTRY typedef ptr CRYPT_OID_FUNC_ENTRY

CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG	EQU	1
@DefProto WINCRYPT32API, CryptInstallOIDFunctionAddress, stdcall, , <:HMODULE, :DWORD, :LPSTR, :DWORD, :ptr CRYPT_OID_FUNC_ENTRY, :DWORD>, 24
@DefProto WINCRYPT32API, CryptInitOIDFunctionSet, stdcall, , <:LPSTR, :DWORD>, 8
@DefProto WINCRYPT32API, CryptGetOIDFunctionAddress, stdcall, , <:HCRYPTOIDFUNCSET, :DWORD, :LPSTR, :DWORD, :ptr ptr , :ptr HCRYPTOIDFUNCADDR>, 24
CRYPT_GET_INSTALLED_OID_FUNC_FLAG	EQU	1h
@DefProto WINCRYPT32API, CryptGetDefaultOIDDllList, stdcall, , <:HCRYPTOIDFUNCSET, :DWORD, :LPWSTR, :ptr DWORD>, 16
@DefProto WINCRYPT32API, CryptGetDefaultOIDFunctionAddress, stdcall, , <:HCRYPTOIDFUNCSET, :DWORD, :LPWSTR, :DWORD, :ptr ptr , :ptr HCRYPTOIDFUNCADDR>, 24
@DefProto WINCRYPT32API, CryptFreeOIDFunctionAddress, stdcall, , <:HCRYPTOIDFUNCADDR, :DWORD>, 8
@DefProto WINCRYPT32API, CryptRegisterOIDFunction, stdcall, , <:DWORD, :LPSTR, :LPSTR, :LPWSTR, :LPSTR>, 20
@DefProto WINCRYPT32API, CryptUnregisterOIDFunction, stdcall, , <:DWORD, :LPSTR, :LPSTR>, 12
@DefProto WINCRYPT32API, CryptRegisterDefaultOIDFunction, stdcall, , <:DWORD, :LPSTR, :DWORD, :LPWSTR>, 16
CRYPT_REGISTER_FIRST_INDEX	EQU	0
CRYPT_REGISTER_LAST_INDEX	EQU	0FFFFFFFFh
@DefProto WINCRYPT32API, CryptUnregisterDefaultOIDFunction, stdcall, , <:DWORD, :LPSTR, :LPWSTR>, 12
@DefProto WINCRYPT32API, CryptSetOIDFunctionValue, stdcall, , <:DWORD, :LPSTR, :LPSTR, :LPWSTR, :DWORD, :ptr BYTE, :DWORD>, 28
@DefProto WINCRYPT32API, CryptGetOIDFunctionValue, stdcall, , <:DWORD, :LPSTR, :LPSTR, :LPWSTR, :ptr DWORD, :ptr BYTE, :ptr DWORD>, 28
proto_PFN_CRYPT_ENUM_OID_FUNC typedef proto stdcall :DWORD,:LPSTR,:LPSTR,:DWORD,:ptr DWORD,:ptr LPWSTR,:ptr ptr BYTE,:ptr DWORD,:ptr 
PFN_CRYPT_ENUM_OID_FUNC typedef ptr proto_PFN_CRYPT_ENUM_OID_FUNC
@DefProto WINCRYPT32API, CryptEnumOIDFunction, stdcall, , <:DWORD, :LPSTR, :LPSTR, :DWORD, :ptr , :PFN_CRYPT_ENUM_OID_FUNC>, 24
CRYPT_MATCH_ANY_ENCODING_TYPE	EQU	0FFFFFFFFh
CRYPT_OID_INFO	struct 
cbSize	DWORD	?
pszOID	LPSTR	?
pwszName	LPWSTR	?
dwGroupId	DWORD	?
union
dwValue	DWORD	?
Algid	ALG_ID	?
dwLength	DWORD	?
ends
ExtraInfo	CRYPT_DATA_BLOB	<>
CRYPT_OID_INFO	ends

PCRYPT_OID_INFO typedef ptr CRYPT_OID_INFO

CCRYPT_OID_INFO typedef CRYPT_OID_INFO
PCCRYPT_OID_INFO typedef ptr CRYPT_OID_INFO
CRYPT_HASH_ALG_OID_GROUP_ID	EQU	1
CRYPT_ENCRYPT_ALG_OID_GROUP_ID	EQU	2
CRYPT_PUBKEY_ALG_OID_GROUP_ID	EQU	3
CRYPT_SIGN_ALG_OID_GROUP_ID	EQU	4
CRYPT_RDN_ATTR_OID_GROUP_ID	EQU	5
CRYPT_EXT_OR_ATTR_OID_GROUP_ID	EQU	6
CRYPT_ENHKEY_USAGE_OID_GROUP_ID	EQU	7
CRYPT_POLICY_OID_GROUP_ID	EQU	8
CRYPT_TEMPLATE_OID_GROUP_ID	EQU	9
CRYPT_LAST_OID_GROUP_ID	EQU	9
CRYPT_FIRST_ALG_OID_GROUP_ID	EQU	<CRYPT_HASH_ALG_OID_GROUP_ID>
CRYPT_LAST_ALG_OID_GROUP_ID	EQU	<CRYPT_SIGN_ALG_OID_GROUP_ID>
CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG	EQU	1h
CRYPT_OID_USE_PUBKEY_PARA_FOR_PKCS7_FLAG	EQU	2h
CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG	EQU	4h
@DefProto WINCRYPT32API, CryptFindOIDInfo, stdcall, , <:DWORD, :ptr , :DWORD>, 12
CRYPT_OID_INFO_OID_KEY	EQU	1
CRYPT_OID_INFO_NAME_KEY	EQU	2
CRYPT_OID_INFO_ALGID_KEY	EQU	3
CRYPT_OID_INFO_SIGN_KEY	EQU	4
@DefProto WINCRYPT32API, CryptRegisterOIDInfo, stdcall, , <:PCCRYPT_OID_INFO, :DWORD>, 8
CRYPT_INSTALL_OID_INFO_BEFORE_FLAG	EQU	1
@DefProto WINCRYPT32API, CryptUnregisterOIDInfo, stdcall, , <:PCCRYPT_OID_INFO>, 4
proto_PFN_CRYPT_ENUM_OID_INFO typedef proto stdcall :PCCRYPT_OID_INFO,:ptr 
PFN_CRYPT_ENUM_OID_INFO typedef ptr proto_PFN_CRYPT_ENUM_OID_INFO
@DefProto WINCRYPT32API, CryptEnumOIDInfo, stdcall, , <:DWORD, :DWORD, :ptr , :PFN_CRYPT_ENUM_OID_INFO>, 16
@DefProto WINCRYPT32API, CryptFindLocalizedName, stdcall, , <:LPWSTR>, 4
CRYPT_LOCALIZED_NAME_ENCODING_TYPE	EQU	0
CRYPT_LOCALIZED_NAME_OID	EQU	<"LocalizedNames">
HCRYPTMSG typedef ptr 
szOID_PKCS_7_DATA	EQU	<"1.2.840.113549.1.7.1">
szOID_PKCS_7_SIGNED	EQU	<"1.2.840.113549.1.7.2">
szOID_PKCS_7_ENVELOPED	EQU	<"1.2.840.113549.1.7.3">
szOID_PKCS_7_SIGNEDANDENVELOPED	EQU	<"1.2.840.113549.1.7.4">
szOID_PKCS_7_DIGESTED	EQU	<"1.2.840.113549.1.7.5">
szOID_PKCS_7_ENCRYPTED	EQU	<"1.2.840.113549.1.7.6">
szOID_PKCS_9_CONTENT_TYPE	EQU	<"1.2.840.113549.1.9.3">
szOID_PKCS_9_MESSAGE_DIGEST	EQU	<"1.2.840.113549.1.9.4">
CMSG_DATA	EQU	1
CMSG_SIGNED	EQU	2
CMSG_ENVELOPED	EQU	3
CMSG_SIGNED_AND_ENVELOPED	EQU	4
CMSG_HASHED	EQU	5
CMSG_ENCRYPTED	EQU	6
CMSG_ALL_FLAGS	EQU	<(  not  0 )>
CMSG_DATA_FLAG	EQU	( 1  shl  CMSG_DATA )
CMSG_SIGNED_FLAG	EQU	( 1  shl  CMSG_SIGNED )
CMSG_ENVELOPED_FLAG	EQU	( 1  shl  CMSG_ENVELOPED )
CMSG_SIGNED_AND_ENVELOPED_FLAG	EQU	( 1  shl  CMSG_SIGNED_AND_ENVELOPED )
CMSG_HASHED_FLAG	EQU	( 1  shl  CMSG_HASHED )
CMSG_ENCRYPTED_FLAG	EQU	( 1  shl  CMSG_ENCRYPTED )
CERT_ISSUER_SERIAL_NUMBER	struct 
Issuer	CERT_NAME_BLOB	<>
SerialNumber	CRYPT_INTEGER_BLOB	<>
CERT_ISSUER_SERIAL_NUMBER	ends

PCERT_ISSUER_SERIAL_NUMBER typedef ptr CERT_ISSUER_SERIAL_NUMBER

CERT_ID	struct 
dwIdChoice	DWORD	?
union
IssuerSerialNumber	CERT_ISSUER_SERIAL_NUMBER	<>
KeyId	CRYPT_HASH_BLOB	<>
HashId	CRYPT_HASH_BLOB	<>
ends
CERT_ID	ends

PCERT_ID typedef ptr CERT_ID

CERT_ID_ISSUER_SERIAL_NUMBER	EQU	1
CERT_ID_KEY_IDENTIFIER	EQU	2
CERT_ID_SHA1_HASH	EQU	3
CMSG_SIGNER_ENCODE_INFO	struct 
cbSize	DWORD	?
pCertInfo	PCERT_INFO	?
hCryptProv	HCRYPTPROV	?
dwKeySpec	DWORD	?
HashAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
pvHashAuxInfo	DWORD	?
cAuthAttr	DWORD	?
rgAuthAttr	PCRYPT_ATTRIBUTE	?
cUnauthAttr	DWORD	?
rgUnauthAttr	PCRYPT_ATTRIBUTE	?
ifdef CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS
SignerId	CERT_ID	<>
HashEncryptionAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
pvHashEncryptionAuxInfo	DWORD	?
endif 
CMSG_SIGNER_ENCODE_INFO	ends

PCMSG_SIGNER_ENCODE_INFO typedef ptr CMSG_SIGNER_ENCODE_INFO

CMSG_SIGNED_ENCODE_INFO	struct 
cbSize	DWORD	?
cSigners	DWORD	?
rgSigners	PCMSG_SIGNER_ENCODE_INFO	?
cCertEncoded	DWORD	?
rgCertEncoded	PCERT_BLOB	?
cCrlEncoded	DWORD	?
rgCrlEncoded	PCRL_BLOB	?
ifdef CMSG_SIGNED_ENCODE_INFO_HAS_CMS_FIELDS
cAttrCertEncoded	DWORD	?
rgAttrCertEncoded	PCERT_BLOB	?
endif 
CMSG_SIGNED_ENCODE_INFO	ends

PCMSG_SIGNED_ENCODE_INFO typedef ptr CMSG_SIGNED_ENCODE_INFO

PCMSG_RECIPIENT_ENCODE_INFO typedef ptr CMSG_RECIPIENT_ENCODE_INFO

CMSG_ENVELOPED_ENCODE_INFO	struct 
cbSize	DWORD	?
hCryptProv	HCRYPTPROV	?
ContentEncryptionAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
pvEncryptionAuxInfo	DWORD	?
cRecipients	DWORD	?
rgpRecipients	DWORD	?
ifdef CMSG_ENVELOPED_ENCODE_INFO_HAS_CMS_FIELDS
rgCmsRecipients	PCMSG_RECIPIENT_ENCODE_INFO	?
cCertEncoded	DWORD	?
rgCertEncoded	PCERT_BLOB	?
cCrlEncoded	DWORD	?
rgCrlEncoded	PCRL_BLOB	?
cAttrCertEncoded	DWORD	?
rgAttrCertEncoded	PCERT_BLOB	?
cUnprotectedAttr	DWORD	?
rgUnprotectedAttr	PCRYPT_ATTRIBUTE	?
endif 
CMSG_ENVELOPED_ENCODE_INFO	ends

PCMSG_ENVELOPED_ENCODE_INFO typedef ptr CMSG_ENVELOPED_ENCODE_INFO

CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO	struct 
cbSize	DWORD	?
KeyEncryptionAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
pvKeyEncryptionAuxInfo	DWORD	?
hCryptProv	HCRYPTPROV	?
RecipientPublicKey	CRYPT_BIT_BLOB	<>
RecipientId	CERT_ID	<>
CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO	ends

PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO typedef ptr CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO

CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO	struct 
cbSize	DWORD	?
RecipientPublicKey	CRYPT_BIT_BLOB	<>
RecipientId	CERT_ID	<>
Date	FILETIME	<>
pOtherAttr	PCRYPT_ATTRIBUTE_TYPE_VALUE	?
CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO	ends

PCMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO typedef ptr CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO

CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO	struct 
cbSize	DWORD	?
KeyEncryptionAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
pvKeyEncryptionAuxInfo	DWORD	?
KeyWrapAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
pvKeyWrapAuxInfo	DWORD	?
hCryptProv	HCRYPTPROV	?
dwKeySpec	DWORD	?
dwKeyChoice	DWORD	?
union
pEphemeralAlgorithm	PCRYPT_ALGORITHM_IDENTIFIER	?
pSenderId	PCERT_ID	?
ends
UserKeyingMaterial	CRYPT_DATA_BLOB	<>
cRecipientEncryptedKeys	DWORD	?
rgpRecipientEncryptedKeys	DWORD	?
CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO	ends

PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO typedef ptr CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO

CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE	EQU	1
CMSG_KEY_AGREE_STATIC_KEY_CHOICE	EQU	2
CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO	struct 
cbSize	DWORD	?
KeyEncryptionAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
pvKeyEncryptionAuxInfo	DWORD	?
hCryptProv	HCRYPTPROV	?
dwKeyChoice	DWORD	?
union
hKeyEncryptionKey	HCRYPTKEY	?
pvKeyEncryptionKey	DWORD	?
ends
KeyId	CRYPT_DATA_BLOB	<>
Date	FILETIME	<>
pOtherAttr	PCRYPT_ATTRIBUTE_TYPE_VALUE	?
CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO	ends

PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO typedef ptr CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO

CMSG_MAIL_LIST_HANDLE_KEY_CHOICE	EQU	1
CMSG_RECIPIENT_ENCODE_INFO	struct 
dwRecipientChoice	DWORD	?
union
pKeyTrans	PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO	?
pKeyAgree	PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO	?
pMailList	PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO	?
ends
CMSG_RECIPIENT_ENCODE_INFO	ends

CMSG_KEY_TRANS_RECIPIENT	EQU	1
CMSG_KEY_AGREE_RECIPIENT	EQU	2
CMSG_MAIL_LIST_RECIPIENT	EQU	3
CMSG_RC2_AUX_INFO	struct 
cbSize	DWORD	?
dwBitLen	DWORD	?
CMSG_RC2_AUX_INFO	ends

PCMSG_RC2_AUX_INFO typedef ptr CMSG_RC2_AUX_INFO

CMSG_SP3_COMPATIBLE_AUX_INFO	struct 
cbSize	DWORD	?
dwFlags	DWORD	?
CMSG_SP3_COMPATIBLE_AUX_INFO	ends

PCMSG_SP3_COMPATIBLE_AUX_INFO typedef ptr CMSG_SP3_COMPATIBLE_AUX_INFO

CMSG_SP3_COMPATIBLE_ENCRYPT_FLAG	EQU	80000000h
CMSG_RC4_AUX_INFO	struct 
cbSize	DWORD	?
dwBitLen	DWORD	?
CMSG_RC4_AUX_INFO	ends

PCMSG_RC4_AUX_INFO typedef ptr CMSG_RC4_AUX_INFO

CMSG_RC4_NO_SALT_FLAG	EQU	40000000h
CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO	struct 
cbSize	DWORD	?
SignedInfo	CMSG_SIGNED_ENCODE_INFO	<>
EnvelopedInfo	CMSG_ENVELOPED_ENCODE_INFO	<>
CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO	ends

PCMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO typedef ptr CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO

CMSG_HASHED_ENCODE_INFO	struct 
cbSize	DWORD	?
hCryptProv	HCRYPTPROV	?
HashAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
pvHashAuxInfo	DWORD	?
CMSG_HASHED_ENCODE_INFO	ends

PCMSG_HASHED_ENCODE_INFO typedef ptr CMSG_HASHED_ENCODE_INFO

CMSG_ENCRYPTED_ENCODE_INFO	struct 
cbSize	DWORD	?
ContentEncryptionAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
pvEncryptionAuxInfo	DWORD	?
CMSG_ENCRYPTED_ENCODE_INFO	ends

PCMSG_ENCRYPTED_ENCODE_INFO typedef ptr CMSG_ENCRYPTED_ENCODE_INFO

proto_PFN_CMSG_STREAM_OUTPUT typedef proto stdcall :ptr ,:ptr BYTE,:DWORD,:BOOL
PFN_CMSG_STREAM_OUTPUT typedef ptr proto_PFN_CMSG_STREAM_OUTPUT
CMSG_INDEFINITE_LENGTH	EQU	0FFFFFFFFh
CMSG_STREAM_INFO	struct 
cbContent	DWORD	?
pfnStreamOutput	PFN_CMSG_STREAM_OUTPUT	?
pvArg	DWORD	?
CMSG_STREAM_INFO	ends

PCMSG_STREAM_INFO typedef ptr CMSG_STREAM_INFO

CMSG_BARE_CONTENT_FLAG	EQU	00000001h
CMSG_LENGTH_ONLY_FLAG	EQU	00000002h
CMSG_DETACHED_FLAG	EQU	00000004h
CMSG_AUTHENTICATED_ATTRIBUTES_FLAG	EQU	00000008h
CMSG_CONTENTS_OCTETS_FLAG	EQU	00000010h
CMSG_MAX_LENGTH_FLAG	EQU	00000020h
CMSG_CMS_ENCAPSULATED_CONTENT_FLAG	EQU	00000040h
CMSG_CRYPT_RELEASE_CONTEXT_FLAG	EQU	00008000h
@DefProto WINCRYPT32API, CryptMsgOpenToEncode, stdcall, , <:DWORD, :DWORD, :DWORD, :ptr , :LPSTR, :PCMSG_STREAM_INFO>, 24
@DefProto WINCRYPT32API, CryptMsgCalculateEncodedLength, stdcall, , <:DWORD, :DWORD, :DWORD, :ptr , :LPSTR, :DWORD>, 24
@DefProto WINCRYPT32API, CryptMsgOpenToDecode, stdcall, , <:DWORD, :DWORD, :DWORD, :HCRYPTPROV, :PCERT_INFO, :PCMSG_STREAM_INFO>, 24
@DefProto WINCRYPT32API, CryptMsgDuplicate, stdcall, , <:HCRYPTMSG>, 4
@DefProto WINCRYPT32API, CryptMsgClose, stdcall, , <:HCRYPTMSG>, 4
@DefProto WINCRYPT32API, CryptMsgUpdate, stdcall, , <:HCRYPTMSG, :ptr BYTE, :DWORD, :BOOL>, 16
@DefProto WINCRYPT32API, CryptMsgGetParam, stdcall, , <:HCRYPTMSG, :DWORD, :DWORD, :ptr , :ptr DWORD>, 20
CMSG_TYPE_PARAM	EQU	1
CMSG_CONTENT_PARAM	EQU	2
CMSG_BARE_CONTENT_PARAM	EQU	3
CMSG_INNER_CONTENT_TYPE_PARAM	EQU	4
CMSG_SIGNER_COUNT_PARAM	EQU	5
CMSG_SIGNER_INFO_PARAM	EQU	6
CMSG_SIGNER_CERT_INFO_PARAM	EQU	7
CMSG_SIGNER_HASH_ALGORITHM_PARAM	EQU	8
CMSG_SIGNER_AUTH_ATTR_PARAM	EQU	9
CMSG_SIGNER_UNAUTH_ATTR_PARAM	EQU	10
CMSG_CERT_COUNT_PARAM	EQU	11
CMSG_CERT_PARAM	EQU	12
CMSG_CRL_COUNT_PARAM	EQU	13
CMSG_CRL_PARAM	EQU	14
CMSG_ENVELOPE_ALGORITHM_PARAM	EQU	15
CMSG_RECIPIENT_COUNT_PARAM	EQU	17
CMSG_RECIPIENT_INDEX_PARAM	EQU	18
CMSG_RECIPIENT_INFO_PARAM	EQU	19
CMSG_HASH_ALGORITHM_PARAM	EQU	20
CMSG_HASH_DATA_PARAM	EQU	21
CMSG_COMPUTED_HASH_PARAM	EQU	22
CMSG_ENCRYPT_PARAM	EQU	26
CMSG_ENCRYPTED_DIGEST	EQU	27
CMSG_ENCODED_SIGNER	EQU	28
CMSG_ENCODED_MESSAGE	EQU	29
CMSG_VERSION_PARAM	EQU	30
CMSG_ATTR_CERT_COUNT_PARAM	EQU	31
CMSG_ATTR_CERT_PARAM	EQU	32
CMSG_CMS_RECIPIENT_COUNT_PARAM	EQU	33
CMSG_CMS_RECIPIENT_INDEX_PARAM	EQU	34
CMSG_CMS_RECIPIENT_ENCRYPTED_KEY_INDEX_PARAM	EQU	35
CMSG_CMS_RECIPIENT_INFO_PARAM	EQU	36
CMSG_UNPROTECTED_ATTR_PARAM	EQU	37
CMSG_SIGNER_CERT_ID_PARAM	EQU	38
CMSG_CMS_SIGNER_INFO_PARAM	EQU	39
CMSG_SIGNER_INFO	struct 
dwVersion	DWORD	?
Issuer	CERT_NAME_BLOB	<>
SerialNumber	CRYPT_INTEGER_BLOB	<>
HashAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
HashEncryptionAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
EncryptedHash	CRYPT_DATA_BLOB	<>
AuthAttrs	CRYPT_ATTRIBUTES	<>
UnauthAttrs	CRYPT_ATTRIBUTES	<>
CMSG_SIGNER_INFO	ends

PCMSG_SIGNER_INFO typedef ptr CMSG_SIGNER_INFO

CMSG_CMS_SIGNER_INFO	struct 
dwVersion	DWORD	?
SignerId	CERT_ID	<>
HashAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
HashEncryptionAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
EncryptedHash	CRYPT_DATA_BLOB	<>
AuthAttrs	CRYPT_ATTRIBUTES	<>
UnauthAttrs	CRYPT_ATTRIBUTES	<>
CMSG_CMS_SIGNER_INFO	ends

PCMSG_CMS_SIGNER_INFO typedef ptr CMSG_CMS_SIGNER_INFO

CMSG_ATTR typedef CRYPT_ATTRIBUTES
PCMSG_ATTR typedef ptr CRYPT_ATTRIBUTES
CMSG_SIGNED_DATA_V1	EQU	1
CMSG_SIGNED_DATA_V3	EQU	3
CMSG_SIGNED_DATA_PKCS_1_5_VERSION	EQU	<CMSG_SIGNED_DATA_V1>
CMSG_SIGNED_DATA_CMS_VERSION	EQU	<CMSG_SIGNED_DATA_V3>
CMSG_SIGNER_INFO_V1	EQU	1
CMSG_SIGNER_INFO_V3	EQU	3
CMSG_SIGNER_INFO_PKCS_1_5_VERSION	EQU	<CMSG_SIGNER_INFO_V1>
CMSG_SIGNER_INFO_CMS_VERSION	EQU	<CMSG_SIGNER_INFO_V3>
CMSG_HASHED_DATA_V0	EQU	0
CMSG_HASHED_DATA_V2	EQU	2
CMSG_HASHED_DATA_PKCS_1_5_VERSION	EQU	<CMSG_HASHED_DATA_V0>
CMSG_HASHED_DATA_CMS_VERSION	EQU	<CMSG_HASHED_DATA_V2>
CMSG_ENVELOPED_DATA_V0	EQU	0
CMSG_ENVELOPED_DATA_V2	EQU	2
CMSG_ENVELOPED_DATA_PKCS_1_5_VERSION	EQU	<CMSG_ENVELOPED_DATA_V0>
CMSG_ENVELOPED_DATA_CMS_VERSION	EQU	<CMSG_ENVELOPED_DATA_V2>
CMSG_KEY_TRANS_RECIPIENT_INFO	struct 
dwVersion	DWORD	?
RecipientId	CERT_ID	<>
KeyEncryptionAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
EncryptedKey	CRYPT_DATA_BLOB	<>
CMSG_KEY_TRANS_RECIPIENT_INFO	ends

PCMSG_KEY_TRANS_RECIPIENT_INFO typedef ptr CMSG_KEY_TRANS_RECIPIENT_INFO

CMSG_RECIPIENT_ENCRYPTED_KEY_INFO	struct 
RecipientId	CERT_ID	<>
EncryptedKey	CRYPT_DATA_BLOB	<>
Date	FILETIME	<>
pOtherAttr	PCRYPT_ATTRIBUTE_TYPE_VALUE	?
CMSG_RECIPIENT_ENCRYPTED_KEY_INFO	ends

PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO typedef ptr CMSG_RECIPIENT_ENCRYPTED_KEY_INFO

CMSG_KEY_AGREE_RECIPIENT_INFO	struct 
dwVersion	DWORD	?
dwOriginatorChoice	DWORD	?
union
OriginatorCertId	CERT_ID	<>
OriginatorPublicKeyInfo	CERT_PUBLIC_KEY_INFO	<>
ends
UserKeyingMaterial	CRYPT_DATA_BLOB	<>
KeyEncryptionAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
cRecipientEncryptedKeys	DWORD	?
rgpRecipientEncryptedKeys	DWORD	?
CMSG_KEY_AGREE_RECIPIENT_INFO	ends

PCMSG_KEY_AGREE_RECIPIENT_INFO typedef ptr CMSG_KEY_AGREE_RECIPIENT_INFO

CMSG_KEY_AGREE_ORIGINATOR_CERT	EQU	1
CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY	EQU	2
CMSG_MAIL_LIST_RECIPIENT_INFO	struct 
dwVersion	DWORD	?
KeyId	CRYPT_DATA_BLOB	<>
KeyEncryptionAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
EncryptedKey	CRYPT_DATA_BLOB	<>
Date	FILETIME	<>
pOtherAttr	PCRYPT_ATTRIBUTE_TYPE_VALUE	?
CMSG_MAIL_LIST_RECIPIENT_INFO	ends

PCMSG_MAIL_LIST_RECIPIENT_INFO typedef ptr CMSG_MAIL_LIST_RECIPIENT_INFO

CMSG_CMS_RECIPIENT_INFO	struct 
dwRecipientChoice	DWORD	?
union
pKeyTrans	PCMSG_KEY_TRANS_RECIPIENT_INFO	?
pKeyAgree	PCMSG_KEY_AGREE_RECIPIENT_INFO	?
pMailList	PCMSG_MAIL_LIST_RECIPIENT_INFO	?
ends
CMSG_CMS_RECIPIENT_INFO	ends

PCMSG_CMS_RECIPIENT_INFO typedef ptr CMSG_CMS_RECIPIENT_INFO

CMSG_ENVELOPED_RECIPIENT_V0	EQU	0
CMSG_ENVELOPED_RECIPIENT_V2	EQU	2
CMSG_ENVELOPED_RECIPIENT_V3	EQU	3
CMSG_ENVELOPED_RECIPIENT_V4	EQU	4
CMSG_KEY_TRANS_PKCS_1_5_VERSION	EQU	<CMSG_ENVELOPED_RECIPIENT_V0>
CMSG_KEY_TRANS_CMS_VERSION	EQU	<CMSG_ENVELOPED_RECIPIENT_V2>
CMSG_KEY_AGREE_VERSION	EQU	<CMSG_ENVELOPED_RECIPIENT_V3>
CMSG_MAIL_LIST_VERSION	EQU	<CMSG_ENVELOPED_RECIPIENT_V4>
@DefProto WINCRYPT32API, CryptMsgControl, stdcall, , <:HCRYPTMSG, :DWORD, :DWORD, :ptr >, 16
CMSG_CTRL_VERIFY_SIGNATURE	EQU	1
CMSG_CTRL_DECRYPT	EQU	2
CMSG_CTRL_VERIFY_HASH	EQU	5
CMSG_CTRL_ADD_SIGNER	EQU	6
CMSG_CTRL_DEL_SIGNER	EQU	7
CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR	EQU	8
CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR	EQU	9
CMSG_CTRL_ADD_CERT	EQU	10
CMSG_CTRL_DEL_CERT	EQU	11
CMSG_CTRL_ADD_CRL	EQU	12
CMSG_CTRL_DEL_CRL	EQU	13
CMSG_CTRL_ADD_ATTR_CERT	EQU	14
CMSG_CTRL_DEL_ATTR_CERT	EQU	15
CMSG_CTRL_KEY_TRANS_DECRYPT	EQU	16
CMSG_CTRL_KEY_AGREE_DECRYPT	EQU	17
CMSG_CTRL_MAIL_LIST_DECRYPT	EQU	18
CMSG_CTRL_VERIFY_SIGNATURE_EX	EQU	19
CMSG_CTRL_ADD_CMS_SIGNER_INFO	EQU	20
CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA	struct 
cbSize	DWORD	?
hCryptProv	HCRYPTPROV	?
dwSignerIndex	DWORD	?
dwSignerType	DWORD	?
pvSigner	DWORD	?
CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA	ends

PCMSG_CTRL_VERIFY_SIGNATURE_EX_PARA typedef ptr CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA

CMSG_VERIFY_SIGNER_PUBKEY	EQU	1
CMSG_VERIFY_SIGNER_CERT	EQU	2
CMSG_VERIFY_SIGNER_CHAIN	EQU	3
CMSG_VERIFY_SIGNER_NULL	EQU	4
CMSG_CTRL_DECRYPT_PARA	struct 
cbSize	DWORD	?
hCryptProv	HCRYPTPROV	?
dwKeySpec	DWORD	?
dwRecipientIndex	DWORD	?
CMSG_CTRL_DECRYPT_PARA	ends

PCMSG_CTRL_DECRYPT_PARA typedef ptr CMSG_CTRL_DECRYPT_PARA

CMSG_CTRL_KEY_TRANS_DECRYPT_PARA	struct 
cbSize	DWORD	?
hCryptProv	HCRYPTPROV	?
dwKeySpec	DWORD	?
pKeyTrans	PCMSG_KEY_TRANS_RECIPIENT_INFO	?
dwRecipientIndex	DWORD	?
CMSG_CTRL_KEY_TRANS_DECRYPT_PARA	ends

PCMSG_CTRL_KEY_TRANS_DECRYPT_PARA typedef ptr CMSG_CTRL_KEY_TRANS_DECRYPT_PARA

CMSG_CTRL_KEY_AGREE_DECRYPT_PARA	struct 
cbSize	DWORD	?
hCryptProv	HCRYPTPROV	?
dwKeySpec	DWORD	?
pKeyAgree	PCMSG_KEY_AGREE_RECIPIENT_INFO	?
dwRecipientIndex	DWORD	?
dwRecipientEncryptedKeyIndex	DWORD	?
OriginatorPublicKey	CRYPT_BIT_BLOB	<>
CMSG_CTRL_KEY_AGREE_DECRYPT_PARA	ends

PCMSG_CTRL_KEY_AGREE_DECRYPT_PARA typedef ptr CMSG_CTRL_KEY_AGREE_DECRYPT_PARA

CMSG_CTRL_MAIL_LIST_DECRYPT_PARA	struct 
cbSize	DWORD	?
hCryptProv	HCRYPTPROV	?
pMailList	PCMSG_MAIL_LIST_RECIPIENT_INFO	?
dwRecipientIndex	DWORD	?
dwKeyChoice	DWORD	?
union
hKeyEncryptionKey	HCRYPTKEY	?
pvKeyEncryptionKey	DWORD	?
ends
CMSG_CTRL_MAIL_LIST_DECRYPT_PARA	ends

PCMSG_CTRL_MAIL_LIST_DECRYPT_PARA typedef ptr CMSG_CTRL_MAIL_LIST_DECRYPT_PARA

CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA	struct 
cbSize	DWORD	?
dwSignerIndex	DWORD	?
blob	CRYPT_DATA_BLOB	<>
CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA	ends

PCMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA typedef ptr CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA

CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA	struct 
cbSize	DWORD	?
dwSignerIndex	DWORD	?
dwUnauthAttrIndex	DWORD	?
CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA	ends

PCMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA typedef ptr CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA

CryptMsgVerifyCountersignatureEncoded proto stdcall :HCRYPTPROV, :DWORD, :PBYTE, :DWORD, :PBYTE, :DWORD, :PCERT_INFO
CryptMsgVerifyCountersignatureEncodedEx proto stdcall :HCRYPTPROV, :DWORD, :PBYTE, :DWORD, :PBYTE, :DWORD, :DWORD, :ptr , :DWORD, :ptr 
CryptMsgCountersign proto stdcall :HCRYPTMSG, :DWORD, :DWORD, :PCMSG_SIGNER_ENCODE_INFO
CryptMsgCountersignEncoded proto stdcall :DWORD, :PBYTE, :DWORD, :DWORD, :PCMSG_SIGNER_ENCODE_INFO, :PBYTE, :PDWORD
proto_PFN_CMSG_ALLOC typedef proto stdcall :size_t
PFN_CMSG_ALLOC typedef ptr proto_PFN_CMSG_ALLOC
proto_PFN_CMSG_FREE typedef proto stdcall :ptr 
PFN_CMSG_FREE typedef ptr proto_PFN_CMSG_FREE
CMSG_OID_GEN_ENCRYPT_KEY_FUNC	EQU	<"CryptMsgDllGenEncryptKey">
proto_PFN_CMSG_GEN_ENCRYPT_KEY typedef proto stdcall :ptr HCRYPTPROV,:PCRYPT_ALGORITHM_IDENTIFIER,:PVOID,:PCERT_PUBLIC_KEY_INFO,:PFN_CMSG_ALLOC,:ptr HCRYPTKEY,:ptr PBYTE,:PDWORD
PFN_CMSG_GEN_ENCRYPT_KEY typedef ptr proto_PFN_CMSG_GEN_ENCRYPT_KEY
CMSG_OID_EXPORT_ENCRYPT_KEY_FUNC	EQU	<"CryptMsgDllExportEncryptKey">
proto_PFN_CMSG_EXPORT_ENCRYPT_KEY typedef proto stdcall :HCRYPTPROV,:HCRYPTKEY,:PCERT_PUBLIC_KEY_INFO,:PBYTE,:PDWORD
PFN_CMSG_EXPORT_ENCRYPT_KEY typedef ptr proto_PFN_CMSG_EXPORT_ENCRYPT_KEY
CMSG_OID_IMPORT_ENCRYPT_KEY_FUNC	EQU	<"CryptMsgDllImportEncryptKey">
proto_PFN_CMSG_IMPORT_ENCRYPT_KEY typedef proto stdcall :HCRYPTPROV,:DWORD,:PCRYPT_ALGORITHM_IDENTIFIER,:PCRYPT_ALGORITHM_IDENTIFIER,:PBYTE,:DWORD,:ptr HCRYPTKEY
PFN_CMSG_IMPORT_ENCRYPT_KEY typedef ptr proto_PFN_CMSG_IMPORT_ENCRYPT_KEY
CMSG_DEFAULT_INSTALLABLE_FUNC_OID	EQU	1
CMSG_CONTENT_ENCRYPT_INFO	struct 
cbSize	DWORD	?
hCryptProv	HCRYPTPROV	?
ContentEncryptionAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
pvEncryptionAuxInfo	DWORD	?
cRecipients	DWORD	?
rgCmsRecipients	PCMSG_RECIPIENT_ENCODE_INFO	?
pfnAlloc	PFN_CMSG_ALLOC	?
pfnFree	PFN_CMSG_FREE	?
dwEncryptFlags	DWORD	?
hContentEncryptKey	HCRYPTKEY	?
dwFlags	DWORD	?
CMSG_CONTENT_ENCRYPT_INFO	ends

PCMSG_CONTENT_ENCRYPT_INFO typedef ptr CMSG_CONTENT_ENCRYPT_INFO

CMSG_CONTENT_ENCRYPT_PAD_ENCODED_LEN_FLAG	EQU	00000001h
CMSG_CONTENT_ENCRYPT_FREE_PARA_FLAG	EQU	00000001h
CMSG_CONTENT_ENCRYPT_RELEASE_CONTEXT_FLAG	EQU	00008000h
CMSG_OID_GEN_CONTENT_ENCRYPT_KEY_FUNC	EQU	<"CryptMsgDllGenContentEncryptKey">
proto_PFN_CMSG_GEN_CONTENT_ENCRYPT_KEY typedef proto stdcall :PCMSG_CONTENT_ENCRYPT_INFO,:DWORD,:ptr 
PFN_CMSG_GEN_CONTENT_ENCRYPT_KEY typedef ptr proto_PFN_CMSG_GEN_CONTENT_ENCRYPT_KEY
CMSG_KEY_TRANS_ENCRYPT_INFO	struct 
cbSize	DWORD	?
dwRecipientIndex	DWORD	?
KeyEncryptionAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
EncryptedKey	CRYPT_DATA_BLOB	<>
dwFlags	DWORD	?
CMSG_KEY_TRANS_ENCRYPT_INFO	ends

PCMSG_KEY_TRANS_ENCRYPT_INFO typedef ptr CMSG_KEY_TRANS_ENCRYPT_INFO

CMSG_KEY_TRANS_ENCRYPT_FREE_PARA_FLAG	EQU	00000001h
CMSG_OID_EXPORT_KEY_TRANS_FUNC	EQU	<"CryptMsgDllExportKeyTrans">
proto_PFN_CMSG_EXPORT_KEY_TRANS typedef proto stdcall :PCMSG_CONTENT_ENCRYPT_INFO,:PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO,:PCMSG_KEY_TRANS_ENCRYPT_INFO,:DWORD,:ptr 
PFN_CMSG_EXPORT_KEY_TRANS typedef ptr proto_PFN_CMSG_EXPORT_KEY_TRANS
CMSG_KEY_AGREE_KEY_ENCRYPT_INFO	struct 
cbSize	DWORD	?
EncryptedKey	CRYPT_DATA_BLOB	<>
CMSG_KEY_AGREE_KEY_ENCRYPT_INFO	ends

PCMSG_KEY_AGREE_KEY_ENCRYPT_INFO typedef ptr CMSG_KEY_AGREE_KEY_ENCRYPT_INFO

CMSG_KEY_AGREE_ENCRYPT_INFO	struct 
cbSize	DWORD	?
dwRecipientIndex	DWORD	?
KeyEncryptionAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
UserKeyingMaterial	CRYPT_DATA_BLOB	<>
dwOriginatorChoice	DWORD	?
union
OriginatorCertId	CERT_ID	<>
OriginatorPublicKeyInfo	CERT_PUBLIC_KEY_INFO	<>
ends
cKeyAgreeKeyEncryptInfo	DWORD	?
rgpKeyAgreeKeyEncryptInfo	DWORD	?
dwFlags	DWORD	?
CMSG_KEY_AGREE_ENCRYPT_INFO	ends

PCMSG_KEY_AGREE_ENCRYPT_INFO typedef ptr CMSG_KEY_AGREE_ENCRYPT_INFO

CMSG_KEY_AGREE_ENCRYPT_FREE_PARA_FLAG	EQU	00000001h
CMSG_KEY_AGREE_ENCRYPT_FREE_MATERIAL_FLAG	EQU	00000002h
CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_ALG_FLAG	EQU	00000004h
CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_PARA_FLAG	EQU	00000008h
CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_BITS_FLAG	EQU	00000010h
CMSG_OID_EXPORT_KEY_AGREE_FUNC	EQU	<"CryptMsgDllExportKeyAgree">
proto_PFN_CMSG_EXPORT_KEY_AGREE typedef proto stdcall :PCMSG_CONTENT_ENCRYPT_INFO,:PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO,:PCMSG_KEY_AGREE_ENCRYPT_INFO,:DWORD,:ptr 
PFN_CMSG_EXPORT_KEY_AGREE typedef ptr proto_PFN_CMSG_EXPORT_KEY_AGREE
CMSG_MAIL_LIST_ENCRYPT_INFO	struct 
cbSize	DWORD	?
dwRecipientIndex	DWORD	?
KeyEncryptionAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
EncryptedKey	CRYPT_DATA_BLOB	<>
dwFlags	DWORD	?
CMSG_MAIL_LIST_ENCRYPT_INFO	ends

PCMSG_MAIL_LIST_ENCRYPT_INFO typedef ptr CMSG_MAIL_LIST_ENCRYPT_INFO

CMSG_MAIL_LIST_ENCRYPT_FREE_PARA_FLAG	EQU	00000001h
CMSG_OID_EXPORT_MAIL_LIST_FUNC	EQU	<"CryptMsgDllExportMailList">
proto_PFN_CMSG_EXPORT_MAIL_LIST typedef proto stdcall :PCMSG_CONTENT_ENCRYPT_INFO,:PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO,:PCMSG_MAIL_LIST_ENCRYPT_INFO,:DWORD,:ptr 
PFN_CMSG_EXPORT_MAIL_LIST typedef ptr proto_PFN_CMSG_EXPORT_MAIL_LIST
CMSG_OID_IMPORT_KEY_TRANS_FUNC	EQU	<"CryptMsgDllImportKeyTrans">
proto_PFN_CMSG_IMPORT_KEY_TRANS typedef proto stdcall :PCRYPT_ALGORITHM_IDENTIFIER,:PCMSG_CTRL_KEY_TRANS_DECRYPT_PARA,:DWORD,:ptr ,:ptr HCRYPTKEY
PFN_CMSG_IMPORT_KEY_TRANS typedef ptr proto_PFN_CMSG_IMPORT_KEY_TRANS
CMSG_OID_IMPORT_KEY_AGREE_FUNC	EQU	<"CryptMsgDllImportKeyAgree">
proto_PFN_CMSG_IMPORT_KEY_AGREE typedef proto stdcall :PCRYPT_ALGORITHM_IDENTIFIER,:PCMSG_CTRL_KEY_AGREE_DECRYPT_PARA,:DWORD,:ptr ,:ptr HCRYPTKEY
PFN_CMSG_IMPORT_KEY_AGREE typedef ptr proto_PFN_CMSG_IMPORT_KEY_AGREE
CMSG_OID_IMPORT_MAIL_LIST_FUNC	EQU	<"CryptMsgDllImportMailList">
proto_PFN_CMSG_IMPORT_MAIL_LIST typedef proto stdcall :PCRYPT_ALGORITHM_IDENTIFIER,:PCMSG_CTRL_MAIL_LIST_DECRYPT_PARA,:DWORD,:ptr ,:ptr HCRYPTKEY
PFN_CMSG_IMPORT_MAIL_LIST typedef ptr proto_PFN_CMSG_IMPORT_MAIL_LIST
HCERTSTORE typedef ptr 
CERT_CONTEXT	struct 
dwCertEncodingType	DWORD	?
pbCertEncoded	DWORD	?
cbCertEncoded	DWORD	?
pCertInfo	PCERT_INFO	?
hCertStore	HCERTSTORE	?
CERT_CONTEXT	ends

PCERT_CONTEXT typedef ptr CERT_CONTEXT

PCCERT_CONTEXT typedef ptr CERT_CONTEXT
CRL_CONTEXT	struct 
dwCertEncodingType	DWORD	?
pbCrlEncoded	DWORD	?
cbCrlEncoded	DWORD	?
pCrlInfo	PCRL_INFO	?
hCertStore	HCERTSTORE	?
CRL_CONTEXT	ends

PCRL_CONTEXT typedef ptr CRL_CONTEXT

PCCRL_CONTEXT typedef ptr CRL_CONTEXT
CTL_CONTEXT	struct 
dwMsgAndCertEncodingType	DWORD	?
pbCtlEncoded	DWORD	?
cbCtlEncoded	DWORD	?
pCtlInfo	PCTL_INFO	?
hCertStore	HCERTSTORE	?
hCryptMsg	HCRYPTMSG	?
pbCtlContent	DWORD	?
cbCtlContent	DWORD	?
CTL_CONTEXT	ends

PCTL_CONTEXT typedef ptr CTL_CONTEXT

PCCTL_CONTEXT typedef ptr CTL_CONTEXT
CERT_KEY_PROV_HANDLE_PROP_ID	EQU	1
CERT_KEY_PROV_INFO_PROP_ID	EQU	2
CERT_SHA1_HASH_PROP_ID	EQU	3
CERT_MD5_HASH_PROP_ID	EQU	4
CERT_HASH_PROP_ID	EQU	<CERT_SHA1_HASH_PROP_ID>
CERT_KEY_CONTEXT_PROP_ID	EQU	5
CERT_KEY_SPEC_PROP_ID	EQU	6
CERT_IE30_RESERVED_PROP_ID	EQU	7
CERT_PUBKEY_HASH_RESERVED_PROP_ID	EQU	8
CERT_ENHKEY_USAGE_PROP_ID	EQU	9
CERT_CTL_USAGE_PROP_ID	EQU	<CERT_ENHKEY_USAGE_PROP_ID>
CERT_NEXT_UPDATE_LOCATION_PROP_ID	EQU	10
CERT_FRIENDLY_NAME_PROP_ID	EQU	11
CERT_PVK_FILE_PROP_ID	EQU	12
CERT_DESCRIPTION_PROP_ID	EQU	13
CERT_ACCESS_STATE_PROP_ID	EQU	14
CERT_SIGNATURE_HASH_PROP_ID	EQU	15
CERT_SMART_CARD_DATA_PROP_ID	EQU	16
CERT_EFS_PROP_ID	EQU	17
CERT_FORTEZZA_DATA_PROP_ID	EQU	18
CERT_ARCHIVED_PROP_ID	EQU	19
CERT_KEY_IDENTIFIER_PROP_ID	EQU	20
CERT_AUTO_ENROLL_PROP_ID	EQU	21
CERT_PUBKEY_ALG_PARA_PROP_ID	EQU	22
CERT_CROSS_CERT_DIST_POINTS_PROP_ID	EQU	23
CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_ID	EQU	24
CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_ID	EQU	25
CERT_ENROLLMENT_PROP_ID	EQU	26
CERT_DATE_STAMP_PROP_ID	EQU	27
CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID	EQU	28
CERT_SUBJECT_NAME_MD5_HASH_PROP_ID	EQU	29
CERT_EXTENDED_ERROR_INFO_PROP_ID	EQU	30
CERT_RENEWAL_PROP_ID	EQU	64
CERT_ARCHIVED_KEY_HASH_PROP_ID	EQU	65
CERT_FIRST_RESERVED_PROP_ID	EQU	66
CERT_LAST_RESERVED_PROP_ID	EQU	00007FFFh
CERT_FIRST_USER_PROP_ID	EQU	00008000h
CERT_LAST_USER_PROP_ID	EQU	0000FFFFh
IS_CERT_HASH_PROP_ID macro X
	exitm <( CERT_SHA1_HASH_PROP_ID == ( X ) || CERT_MD5_HASH_PROP_ID == ( X ) || CERT_SIGNATURE_HASH_PROP_ID == ( X ) ) >
	endm
IS_PUBKEY_HASH_PROP_ID macro X
	exitm <( CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_ID == ( X ) || CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_ID == ( X ) ) >
	endm
IS_CHAIN_HASH_PROP_ID macro X
	exitm <( CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_ID == ( X ) || CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_ID == ( X ) || CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID == ( X ) || CERT_SUBJECT_NAME_MD5_HASH_PROP_ID == ( X ) ) >
	endm
szOID_CERT_PROP_ID_PREFIX	EQU	<"1.3.6.1.4.1.311.10.11.">
szOID_CERT_KEY_IDENTIFIER_PROP_ID	EQU	<"1.3.6.1.4.1.311.10.11.20">
szOID_CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID	EQU	<"1.3.6.1.4.1.311.10.11.28">
szOID_CERT_SUBJECT_NAME_MD5_HASH_PROP_ID	EQU	<"1.3.6.1.4.1.311.10.11.29">
CERT_ACCESS_STATE_WRITE_PERSIST_FLAG	EQU	1h
CERT_ACCESS_STATE_SYSTEM_STORE_FLAG	EQU	2h
CRYPT_KEY_PROV_PARAM	struct 
dwParam	DWORD	?
pbData	DWORD	?
cbData	DWORD	?
dwFlags	DWORD	?
CRYPT_KEY_PROV_PARAM	ends

PCRYPT_KEY_PROV_PARAM typedef ptr CRYPT_KEY_PROV_PARAM

CRYPT_KEY_PROV_INFO	struct 
pwszContainerName	LPWSTR	?
pwszProvName	LPWSTR	?
dwProvType	DWORD	?
dwFlags	DWORD	?
cProvParam	DWORD	?
rgProvParam	PCRYPT_KEY_PROV_PARAM	?
dwKeySpec	DWORD	?
CRYPT_KEY_PROV_INFO	ends

PCRYPT_KEY_PROV_INFO typedef ptr CRYPT_KEY_PROV_INFO

CERT_SET_KEY_PROV_HANDLE_PROP_ID	EQU	00000001h
CERT_SET_KEY_CONTEXT_PROP_ID	EQU	00000001h
CERT_KEY_CONTEXT	struct 
cbSize	DWORD	?
hCryptProv	HCRYPTPROV	?
dwKeySpec	DWORD	?
CERT_KEY_CONTEXT	ends

PCERT_KEY_CONTEXT typedef ptr CERT_KEY_CONTEXT

CERT_STORE_PROV_MSG	EQU	1
CERT_STORE_PROV_MEMORY	EQU	2
CERT_STORE_PROV_FILE	EQU	3
CERT_STORE_PROV_REG	EQU	4
CERT_STORE_PROV_PKCS7	EQU	5
CERT_STORE_PROV_SERIALIZED	EQU	6
CERT_STORE_PROV_FILENAME_A	EQU	7
CERT_STORE_PROV_FILENAME_W	EQU	8
CERT_STORE_PROV_FILENAME	EQU	<CERT_STORE_PROV_FILENAME_W>
CERT_STORE_PROV_SYSTEM_A	EQU	9
CERT_STORE_PROV_SYSTEM_W	EQU	10
CERT_STORE_PROV_SYSTEM	EQU	<CERT_STORE_PROV_SYSTEM_W>
CERT_STORE_PROV_COLLECTION	EQU	11
CERT_STORE_PROV_SYSTEM_REGISTRY_A	EQU	12
CERT_STORE_PROV_SYSTEM_REGISTRY_W	EQU	13
CERT_STORE_PROV_SYSTEM_REGISTRY	EQU	<CERT_STORE_PROV_SYSTEM_REGISTRY_W>
CERT_STORE_PROV_PHYSICAL_W	EQU	14
CERT_STORE_PROV_PHYSICAL	EQU	<CERT_STORE_PROV_PHYSICAL_W>
CERT_STORE_PROV_SMART_CARD_W	EQU	15
CERT_STORE_PROV_SMART_CARD	EQU	<CERT_STORE_PROV_SMART_CARD_W>
CERT_STORE_PROV_LDAP_W	EQU	16
CERT_STORE_PROV_LDAP	EQU	<CERT_STORE_PROV_LDAP_W>
sz_CERT_STORE_PROV_MEMORY	EQU	<"Memory">
sz_CERT_STORE_PROV_FILENAME_W	EQU	<"File">
sz_CERT_STORE_PROV_FILENAME	EQU	<sz_CERT_STORE_PROV_FILENAME_W>
sz_CERT_STORE_PROV_SYSTEM_W	EQU	<"System">
sz_CERT_STORE_PROV_SYSTEM	EQU	<sz_CERT_STORE_PROV_SYSTEM_W>
sz_CERT_STORE_PROV_PKCS7	EQU	<"PKCS7">
sz_CERT_STORE_PROV_SERIALIZED	EQU	<"Serialized">
sz_CERT_STORE_PROV_COLLECTION	EQU	<"Collection">
sz_CERT_STORE_PROV_SYSTEM_REGISTRY_W	EQU	<"SystemRegistry">
sz_CERT_STORE_PROV_SYSTEM_REGISTRY	EQU	<sz_CERT_STORE_PROV_SYSTEM_REGISTRY_W>
sz_CERT_STORE_PROV_PHYSICAL_W	EQU	<"Physical">
sz_CERT_STORE_PROV_PHYSICAL	EQU	<sz_CERT_STORE_PROV_PHYSICAL_W>
sz_CERT_STORE_PROV_SMART_CARD_W	EQU	<"SmartCard">
sz_CERT_STORE_PROV_SMART_CARD	EQU	<sz_CERT_STORE_PROV_SMART_CARD_W>
sz_CERT_STORE_PROV_LDAP_W	EQU	<"Ldap">
sz_CERT_STORE_PROV_LDAP	EQU	<sz_CERT_STORE_PROV_LDAP_W>
CERT_STORE_SIGNATURE_FLAG	EQU	00000001h
CERT_STORE_TIME_VALIDITY_FLAG	EQU	00000002h
CERT_STORE_REVOCATION_FLAG	EQU	00000004h
CERT_STORE_NO_CRL_FLAG	EQU	00010000h
CERT_STORE_NO_ISSUER_FLAG	EQU	00020000h
CERT_STORE_BASE_CRL_FLAG	EQU	00000100h
CERT_STORE_DELTA_CRL_FLAG	EQU	00000200h
CERT_STORE_NO_CRYPT_RELEASE_FLAG	EQU	00000001h
CERT_STORE_SET_LOCALIZED_NAME_FLAG	EQU	00000002h
CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG	EQU	00000004h
CERT_STORE_DELETE_FLAG	EQU	00000010h
CERT_STORE_SHARE_STORE_FLAG	EQU	00000040h
CERT_STORE_SHARE_CONTEXT_FLAG	EQU	00000080h
CERT_STORE_MANIFOLD_FLAG	EQU	00000100h
CERT_STORE_ENUM_ARCHIVED_FLAG	EQU	00000200h
CERT_STORE_UPDATE_KEYID_FLAG	EQU	00000400h
CERT_STORE_BACKUP_RESTORE_FLAG	EQU	00000800h
CERT_STORE_READONLY_FLAG	EQU	00008000h
CERT_STORE_OPEN_EXISTING_FLAG	EQU	00004000h
CERT_STORE_CREATE_NEW_FLAG	EQU	00002000h
CERT_STORE_MAXIMUM_ALLOWED_FLAG	EQU	00001000h
CERT_SYSTEM_STORE_MASK	EQU	0FFFF0000h
CERT_SYSTEM_STORE_RELOCATE_FLAG	EQU	80000000h
CERT_SYSTEM_STORE_RELOCATE_PARA	struct 
union
hKeyBase	HKEY	?
pvBase	DWORD	?
ends
union
pvSystemStore	DWORD	?
pszSystemStore	LPSTR	?
pwszSystemStore	LPWSTR	?
ends
CERT_SYSTEM_STORE_RELOCATE_PARA	ends

PCERT_SYSTEM_STORE_RELOCATE_PARA typedef ptr CERT_SYSTEM_STORE_RELOCATE_PARA

CERT_SYSTEM_STORE_UNPROTECTED_FLAG	EQU	40000000h
CERT_SYSTEM_STORE_LOCATION_MASK	EQU	00FF0000h
CERT_SYSTEM_STORE_LOCATION_SHIFT	EQU	16
CERT_SYSTEM_STORE_CURRENT_USER_ID	EQU	1
CERT_SYSTEM_STORE_LOCAL_MACHINE_ID	EQU	2
CERT_SYSTEM_STORE_CURRENT_SERVICE_ID	EQU	4
CERT_SYSTEM_STORE_SERVICES_ID	EQU	5
CERT_SYSTEM_STORE_USERS_ID	EQU	6
CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY_ID	EQU	7
CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY_ID	EQU	8
CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE_ID	EQU	9
CERT_SYSTEM_STORE_CURRENT_USER	EQU	( CERT_SYSTEM_STORE_CURRENT_USER_ID  shl  CERT_SYSTEM_STORE_LOCATION_SHIFT )
CERT_SYSTEM_STORE_LOCAL_MACHINE	EQU	( CERT_SYSTEM_STORE_LOCAL_MACHINE_ID  shl  CERT_SYSTEM_STORE_LOCATION_SHIFT )
CERT_SYSTEM_STORE_CURRENT_SERVICE	EQU	( CERT_SYSTEM_STORE_CURRENT_SERVICE_ID  shl  CERT_SYSTEM_STORE_LOCATION_SHIFT )
CERT_SYSTEM_STORE_SERVICES	EQU	( CERT_SYSTEM_STORE_SERVICES_ID  shl  CERT_SYSTEM_STORE_LOCATION_SHIFT )
CERT_SYSTEM_STORE_USERS	EQU	( CERT_SYSTEM_STORE_USERS_ID  shl  CERT_SYSTEM_STORE_LOCATION_SHIFT )
CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY	EQU	( CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY_ID  shl  CERT_SYSTEM_STORE_LOCATION_SHIFT )
CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY	EQU	( CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY_ID  shl  CERT_SYSTEM_STORE_LOCATION_SHIFT )
CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE	EQU	( CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE_ID  shl  CERT_SYSTEM_STORE_LOCATION_SHIFT )
CERT_GROUP_POLICY_SYSTEM_STORE_REGPATH	EQU	<L("Software\Policies\Microsoft\SystemCertificates")>
CERT_EFSBLOB_REGPATH	EQU	<CERT_GROUP_POLICY_SYSTEM_STORE_REGPATH L("\EFS")>
CERT_EFSBLOB_VALUE_NAME	EQU	<L("EFSBlob")>
CERT_PROT_ROOT_FLAGS_REGPATH	EQU	<CERT_GROUP_POLICY_SYSTEM_STORE_REGPATH L("\Root\ProtectedRoots")>
CERT_PROT_ROOT_FLAGS_VALUE_NAME	EQU	<L("Flags")>
CERT_PROT_ROOT_DISABLE_CURRENT_USER_FLAG	EQU	1h
CERT_PROT_ROOT_INHIBIT_ADD_AT_INIT_FLAG	EQU	2h
CERT_PROT_ROOT_INHIBIT_PURGE_LM_FLAG	EQU	4h
CERT_PROT_ROOT_DISABLE_LM_AUTH_FLAG	EQU	8h
CERT_PROT_ROOT_ONLY_LM_GPT_FLAG	EQU	8h
CERT_PROT_ROOT_DISABLE_NT_AUTH_REQUIRED_FLAG	EQU	10h
CERT_TRUST_PUB_SAFER_GROUP_POLICY_REGPATH	EQU	<CERT_GROUP_POLICY_SYSTEM_STORE_REGPATH L("\TrustedPublisher\Safer")>
CERT_LOCAL_MACHINE_SYSTEM_STORE_REGPATH	EQU	<L("Software\Microsoft\SystemCertificates")>
CERT_TRUST_PUB_SAFER_LOCAL_MACHINE_REGPATH	EQU	<CERT_LOCAL_MACHINE_SYSTEM_STORE_REGPATH L("\TrustedPublisher\Safer")>
CERT_TRUST_PUB_AUTHENTICODE_FLAGS_VALUE_NAME	EQU	<L("AuthenticodeFlags")>
CERT_TRUST_PUB_ALLOW_TRUST_MASK	EQU	00000003h
CERT_TRUST_PUB_ALLOW_END_USER_TRUST	EQU	00000000h
CERT_TRUST_PUB_ALLOW_MACHINE_ADMIN_TRUST	EQU	00000001h
CERT_TRUST_PUB_ALLOW_ENTERPRISE_ADMIN_TRUST	EQU	00000002h
CERT_TRUST_PUB_CHECK_PUBLISHER_REV_FLAG	EQU	00000100h
CERT_TRUST_PUB_CHECK_TIMESTAMP_REV_FLAG	EQU	00000200h
CERT_OCM_SUBCOMPONENTS_LOCAL_MACHINE_REGPATH	EQU	<L("SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\OC Manager\Subcomponents")>
CERT_OCM_SUBCOMPONENTS_ROOT_AUTO_UPDATE_VALUE_NAME	EQU	<L("RootAutoUpdate")>
CERT_AUTH_ROOT_AUTO_UPDATE_LOCAL_MACHINE_REGPATH	EQU	<CERT_LOCAL_MACHINE_SYSTEM_STORE_REGPATH L("\AuthRoot\AutoUpdate")>
CERT_AUTH_ROOT_AUTO_UPDATE_ROOT_DIR_URL_VALUE_NAME	EQU	<L("RootDirUrl")>
CERT_AUTH_ROOT_AUTO_UPDATE_SYNC_DELTA_TIME_VALUE_NAME	EQU	<L("SyncDeltaTime")>
CERT_AUTH_ROOT_AUTO_UPDATE_FLAGS_VALUE_NAME	EQU	<L("Flags")>
CERT_AUTH_ROOT_AUTO_UPDATE_DISABLE_UNTRUSTED_ROOT_LOGGING_FLAG	EQU	1h
CERT_AUTH_ROOT_AUTO_UPDATE_DISABLE_PARTIAL_CHAIN_LOGGING_FLAG	EQU	2h
CERT_AUTH_ROOT_CTL_FILENAME	EQU	<L("authroot.stl")>
CERT_AUTH_ROOT_CTL_FILENAME_A	EQU	<"authroot.stl">
CERT_AUTH_ROOT_CAB_FILENAME	EQU	<L("authrootstl.cab")>
CERT_AUTH_ROOT_SEQ_FILENAME	EQU	<L("authrootseq.txt")>
CERT_AUTH_ROOT_CERT_EXT	EQU	<L(".crt")>
CERT_REGISTRY_STORE_REMOTE_FLAG	EQU	10000h
CERT_REGISTRY_STORE_SERIALIZED_FLAG	EQU	20000h
CERT_REGISTRY_STORE_CLIENT_GPT_FLAG	EQU	80000000h
CERT_REGISTRY_STORE_LM_GPT_FLAG	EQU	01000000h
CERT_REGISTRY_STORE_CLIENT_GPT_PARA	struct 
hKeyBase	HKEY	?
pwszRegPath	LPWSTR	?
CERT_REGISTRY_STORE_CLIENT_GPT_PARA	ends

PCERT_REGISTRY_STORE_CLIENT_GPT_PARA typedef ptr CERT_REGISTRY_STORE_CLIENT_GPT_PARA

CERT_REGISTRY_STORE_ROAMING_FLAG	EQU	40000h
CERT_REGISTRY_STORE_ROAMING_PARA	struct 
hKey	HKEY	?
pwszStoreDirectory	LPWSTR	?
CERT_REGISTRY_STORE_ROAMING_PARA	ends

PCERT_REGISTRY_STORE_ROAMING_PARA typedef ptr CERT_REGISTRY_STORE_ROAMING_PARA

CERT_REGISTRY_STORE_MY_IE_DIRTY_FLAG	EQU	80000h
CERT_IE_DIRTY_FLAGS_REGPATH	EQU	<L("Software\Microsoft\Cryptography\IEDirtyFlags")>
CERT_FILE_STORE_COMMIT_ENABLE_FLAG	EQU	10000h
CERT_LDAP_STORE_SIGN_FLAG	EQU	10000h
CERT_LDAP_STORE_AREC_EXCLUSIVE_FLAG	EQU	20000h
@DefProto WINCRYPT32API, CertOpenStore, stdcall, , <:LPSTR, :DWORD, :HCRYPTPROV, :DWORD, :ptr >, 20
HCERTSTOREPROV typedef ptr 
CRYPT_OID_OPEN_STORE_PROV_FUNC	EQU	<"CertDllOpenStoreProv">
CERT_STORE_PROV_INFO	struct 
cbSize	DWORD	?
cStoreProvFunc	DWORD	?
rgpvStoreProvFunc	DWORD	?
hStoreProv	HCERTSTOREPROV	?
dwStoreProvFlags	DWORD	?
hStoreProvFuncAddr2	HCRYPTOIDFUNCADDR	?
CERT_STORE_PROV_INFO	ends

PCERT_STORE_PROV_INFO typedef ptr CERT_STORE_PROV_INFO

proto_PFN_CERT_DLL_OPEN_STORE_PROV_FUNC typedef proto stdcall :LPSTR,:DWORD,:HCRYPTPROV,:DWORD,:ptr ,:HCERTSTORE,:PCERT_STORE_PROV_INFO
PFN_CERT_DLL_OPEN_STORE_PROV_FUNC typedef ptr proto_PFN_CERT_DLL_OPEN_STORE_PROV_FUNC
CERT_STORE_PROV_EXTERNAL_FLAG	EQU	1h
CERT_STORE_PROV_DELETED_FLAG	EQU	2h
CERT_STORE_PROV_NO_PERSIST_FLAG	EQU	4h
CERT_STORE_PROV_SYSTEM_STORE_FLAG	EQU	8h
CERT_STORE_PROV_CLOSE_FUNC	EQU	0
CERT_STORE_PROV_READ_CERT_FUNC	EQU	1
CERT_STORE_PROV_WRITE_CERT_FUNC	EQU	2
CERT_STORE_PROV_DELETE_CERT_FUNC	EQU	3
CERT_STORE_PROV_SET_CERT_PROPERTY_FUNC	EQU	4
CERT_STORE_PROV_READ_CRL_FUNC	EQU	5
CERT_STORE_PROV_WRITE_CRL_FUNC	EQU	6
CERT_STORE_PROV_DELETE_CRL_FUNC	EQU	7
CERT_STORE_PROV_SET_CRL_PROPERTY_FUNC	EQU	8
CERT_STORE_PROV_READ_CTL_FUNC	EQU	9
CERT_STORE_PROV_WRITE_CTL_FUNC	EQU	10
CERT_STORE_PROV_DELETE_CTL_FUNC	EQU	11
CERT_STORE_PROV_SET_CTL_PROPERTY_FUNC	EQU	12
CERT_STORE_PROV_CONTROL_FUNC	EQU	13
CERT_STORE_PROV_FIND_CERT_FUNC	EQU	14
CERT_STORE_PROV_FREE_FIND_CERT_FUNC	EQU	15
CERT_STORE_PROV_GET_CERT_PROPERTY_FUNC	EQU	16
CERT_STORE_PROV_FIND_CRL_FUNC	EQU	17
CERT_STORE_PROV_FREE_FIND_CRL_FUNC	EQU	18
CERT_STORE_PROV_GET_CRL_PROPERTY_FUNC	EQU	19
CERT_STORE_PROV_FIND_CTL_FUNC	EQU	20
CERT_STORE_PROV_FREE_FIND_CTL_FUNC	EQU	21
CERT_STORE_PROV_GET_CTL_PROPERTY_FUNC	EQU	22
proto_PFN_CERT_STORE_PROV_CLOSE typedef proto stdcall :HCERTSTOREPROV,:DWORD
PFN_CERT_STORE_PROV_CLOSE typedef ptr proto_PFN_CERT_STORE_PROV_CLOSE
proto_PFN_CERT_STORE_PROV_READ_CERT typedef proto stdcall :HCERTSTOREPROV,:PCCERT_CONTEXT,:DWORD,:ptr PCCERT_CONTEXT
PFN_CERT_STORE_PROV_READ_CERT typedef ptr proto_PFN_CERT_STORE_PROV_READ_CERT
CERT_STORE_PROV_WRITE_ADD_FLAG	EQU	1h
proto_PFN_CERT_STORE_PROV_WRITE_CERT typedef proto stdcall :HCERTSTOREPROV,:PCCERT_CONTEXT,:DWORD
PFN_CERT_STORE_PROV_WRITE_CERT typedef ptr proto_PFN_CERT_STORE_PROV_WRITE_CERT
proto_PFN_CERT_STORE_PROV_DELETE_CERT typedef proto stdcall :HCERTSTOREPROV,:PCCERT_CONTEXT,:DWORD
PFN_CERT_STORE_PROV_DELETE_CERT typedef ptr proto_PFN_CERT_STORE_PROV_DELETE_CERT
proto_PFN_CERT_STORE_PROV_SET_CERT_PROPERTY typedef proto stdcall :HCERTSTOREPROV,:PCCERT_CONTEXT,:DWORD,:DWORD,:ptr 
PFN_CERT_STORE_PROV_SET_CERT_PROPERTY typedef ptr proto_PFN_CERT_STORE_PROV_SET_CERT_PROPERTY
proto_PFN_CERT_STORE_PROV_READ_CRL typedef proto stdcall :HCERTSTOREPROV,:PCCRL_CONTEXT,:DWORD,:ptr PCCRL_CONTEXT
PFN_CERT_STORE_PROV_READ_CRL typedef ptr proto_PFN_CERT_STORE_PROV_READ_CRL
proto_PFN_CERT_STORE_PROV_WRITE_CRL typedef proto stdcall :HCERTSTOREPROV,:PCCRL_CONTEXT,:DWORD
PFN_CERT_STORE_PROV_WRITE_CRL typedef ptr proto_PFN_CERT_STORE_PROV_WRITE_CRL
proto_PFN_CERT_STORE_PROV_DELETE_CRL typedef proto stdcall :HCERTSTOREPROV,:PCCRL_CONTEXT,:DWORD
PFN_CERT_STORE_PROV_DELETE_CRL typedef ptr proto_PFN_CERT_STORE_PROV_DELETE_CRL
proto_PFN_CERT_STORE_PROV_SET_CRL_PROPERTY typedef proto stdcall :HCERTSTOREPROV,:PCCRL_CONTEXT,:DWORD,:DWORD,:ptr 
PFN_CERT_STORE_PROV_SET_CRL_PROPERTY typedef ptr proto_PFN_CERT_STORE_PROV_SET_CRL_PROPERTY
proto_PFN_CERT_STORE_PROV_READ_CTL typedef proto stdcall :HCERTSTOREPROV,:PCCTL_CONTEXT,:DWORD,:ptr PCCTL_CONTEXT
PFN_CERT_STORE_PROV_READ_CTL typedef ptr proto_PFN_CERT_STORE_PROV_READ_CTL
proto_PFN_CERT_STORE_PROV_WRITE_CTL typedef proto stdcall :HCERTSTOREPROV,:PCCTL_CONTEXT,:DWORD
PFN_CERT_STORE_PROV_WRITE_CTL typedef ptr proto_PFN_CERT_STORE_PROV_WRITE_CTL
proto_PFN_CERT_STORE_PROV_DELETE_CTL typedef proto stdcall :HCERTSTOREPROV,:PCCTL_CONTEXT,:DWORD
PFN_CERT_STORE_PROV_DELETE_CTL typedef ptr proto_PFN_CERT_STORE_PROV_DELETE_CTL
proto_PFN_CERT_STORE_PROV_SET_CTL_PROPERTY typedef proto stdcall :HCERTSTOREPROV,:PCCTL_CONTEXT,:DWORD,:DWORD,:ptr 
PFN_CERT_STORE_PROV_SET_CTL_PROPERTY typedef ptr proto_PFN_CERT_STORE_PROV_SET_CTL_PROPERTY
proto_PFN_CERT_STORE_PROV_CONTROL typedef proto stdcall :HCERTSTOREPROV,:DWORD,:DWORD,:ptr 
PFN_CERT_STORE_PROV_CONTROL typedef ptr proto_PFN_CERT_STORE_PROV_CONTROL
CERT_STORE_PROV_FIND_INFO	struct 
cbSize	DWORD	?
dwMsgAndCertEncodingType	DWORD	?
dwFindFlags	DWORD	?
dwFindType	DWORD	?
pvFindPara	DWORD	?
CERT_STORE_PROV_FIND_INFO	ends

PCERT_STORE_PROV_FIND_INFO typedef ptr CERT_STORE_PROV_FIND_INFO

CCERT_STORE_PROV_FIND_INFO typedef CERT_STORE_PROV_FIND_INFO
PCCERT_STORE_PROV_FIND_INFO typedef ptr CERT_STORE_PROV_FIND_INFO
proto_PFN_CERT_STORE_PROV_FIND_CERT typedef proto stdcall :HCERTSTOREPROV,:PCCERT_STORE_PROV_FIND_INFO,:PCCERT_CONTEXT,:DWORD,:ptr ptr ,:ptr PCCERT_CONTEXT
PFN_CERT_STORE_PROV_FIND_CERT typedef ptr proto_PFN_CERT_STORE_PROV_FIND_CERT
proto_PFN_CERT_STORE_PROV_FREE_FIND_CERT typedef proto stdcall :HCERTSTOREPROV,:PCCERT_CONTEXT,:ptr ,:DWORD
PFN_CERT_STORE_PROV_FREE_FIND_CERT typedef ptr proto_PFN_CERT_STORE_PROV_FREE_FIND_CERT
proto_PFN_CERT_STORE_PROV_GET_CERT_PROPERTY typedef proto stdcall :HCERTSTOREPROV,:PCCERT_CONTEXT,:DWORD,:DWORD,:ptr ,:ptr DWORD
PFN_CERT_STORE_PROV_GET_CERT_PROPERTY typedef ptr proto_PFN_CERT_STORE_PROV_GET_CERT_PROPERTY
proto_PFN_CERT_STORE_PROV_FIND_CRL typedef proto stdcall :HCERTSTOREPROV,:PCCERT_STORE_PROV_FIND_INFO,:PCCRL_CONTEXT,:DWORD,:ptr ptr ,:ptr PCCRL_CONTEXT
PFN_CERT_STORE_PROV_FIND_CRL typedef ptr proto_PFN_CERT_STORE_PROV_FIND_CRL
proto_PFN_CERT_STORE_PROV_FREE_FIND_CRL typedef proto stdcall :HCERTSTOREPROV,:PCCRL_CONTEXT,:ptr ,:DWORD
PFN_CERT_STORE_PROV_FREE_FIND_CRL typedef ptr proto_PFN_CERT_STORE_PROV_FREE_FIND_CRL
proto_PFN_CERT_STORE_PROV_GET_CRL_PROPERTY typedef proto stdcall :HCERTSTOREPROV,:PCCRL_CONTEXT,:DWORD,:DWORD,:ptr ,:ptr DWORD
PFN_CERT_STORE_PROV_GET_CRL_PROPERTY typedef ptr proto_PFN_CERT_STORE_PROV_GET_CRL_PROPERTY
proto_PFN_CERT_STORE_PROV_FIND_CTL typedef proto stdcall :HCERTSTOREPROV,:PCCERT_STORE_PROV_FIND_INFO,:PCCTL_CONTEXT,:DWORD,:ptr ptr ,:ptr PCCTL_CONTEXT
PFN_CERT_STORE_PROV_FIND_CTL typedef ptr proto_PFN_CERT_STORE_PROV_FIND_CTL
proto_PFN_CERT_STORE_PROV_FREE_FIND_CTL typedef proto stdcall :HCERTSTOREPROV,:PCCTL_CONTEXT,:ptr ,:DWORD
PFN_CERT_STORE_PROV_FREE_FIND_CTL typedef ptr proto_PFN_CERT_STORE_PROV_FREE_FIND_CTL
proto_PFN_CERT_STORE_PROV_GET_CTL_PROPERTY typedef proto stdcall :HCERTSTOREPROV,:PCCTL_CONTEXT,:DWORD,:DWORD,:ptr ,:ptr DWORD
PFN_CERT_STORE_PROV_GET_CTL_PROPERTY typedef ptr proto_PFN_CERT_STORE_PROV_GET_CTL_PROPERTY
@DefProto WINCRYPT32API, CertDuplicateStore, stdcall, , <:HCERTSTORE>, 4
CERT_STORE_SAVE_AS_STORE	EQU	1
CERT_STORE_SAVE_AS_PKCS7	EQU	2
CERT_STORE_SAVE_TO_FILE	EQU	1
CERT_STORE_SAVE_TO_MEMORY	EQU	2
CERT_STORE_SAVE_TO_FILENAME_A	EQU	3
CERT_STORE_SAVE_TO_FILENAME_W	EQU	4
CERT_STORE_SAVE_TO_FILENAME	EQU	<CERT_STORE_SAVE_TO_FILENAME_W>
@DefProto WINCRYPT32API, CertSaveStore, stdcall, , <:HCERTSTORE, :DWORD, :DWORD, :DWORD, :ptr , :DWORD>, 24
CERT_CLOSE_STORE_FORCE_FLAG	EQU	00000001h
CERT_CLOSE_STORE_CHECK_FLAG	EQU	00000002h
@DefProto WINCRYPT32API, CertCloseStore, stdcall, , <:HCERTSTORE, :DWORD>, 8
@DefProto WINCRYPT32API, CertGetSubjectCertificateFromStore, stdcall, , <:HCERTSTORE, :DWORD, :PCERT_INFO>, 12
@DefProto WINCRYPT32API, CertEnumCertificatesInStore, stdcall, , <:HCERTSTORE, :PCCERT_CONTEXT>, 8
@DefProto WINCRYPT32API, CertFindCertificateInStore, stdcall, , <:HCERTSTORE, :DWORD, :DWORD, :DWORD, :ptr , :PCCERT_CONTEXT>, 24
CERT_COMPARE_MASK	EQU	0FFFFh
CERT_COMPARE_SHIFT	EQU	16
CERT_COMPARE_ANY	EQU	0
CERT_COMPARE_SHA1_HASH	EQU	1
CERT_COMPARE_NAME	EQU	2
CERT_COMPARE_ATTR	EQU	3
CERT_COMPARE_MD5_HASH	EQU	4
CERT_COMPARE_PROPERTY	EQU	5
CERT_COMPARE_PUBLIC_KEY	EQU	6
CERT_COMPARE_HASH	EQU	<CERT_COMPARE_SHA1_HASH>
CERT_COMPARE_NAME_STR_A	EQU	7
CERT_COMPARE_NAME_STR_W	EQU	8
CERT_COMPARE_KEY_SPEC	EQU	9
CERT_COMPARE_ENHKEY_USAGE	EQU	10
CERT_COMPARE_CTL_USAGE	EQU	<CERT_COMPARE_ENHKEY_USAGE>
CERT_COMPARE_SUBJECT_CERT	EQU	11
CERT_COMPARE_ISSUER_OF	EQU	12
CERT_COMPARE_EXISTING	EQU	13
CERT_COMPARE_SIGNATURE_HASH	EQU	14
CERT_COMPARE_KEY_IDENTIFIER	EQU	15
CERT_COMPARE_CERT_ID	EQU	16
CERT_COMPARE_CROSS_CERT_DIST_POINTS	EQU	17
CERT_COMPARE_PUBKEY_MD5_HASH	EQU	18
CERT_FIND_ANY	EQU	( CERT_COMPARE_ANY  shl  CERT_COMPARE_SHIFT )
CERT_FIND_SHA1_HASH	EQU	( CERT_COMPARE_SHA1_HASH  shl  CERT_COMPARE_SHIFT )
CERT_FIND_MD5_HASH	EQU	( CERT_COMPARE_MD5_HASH  shl  CERT_COMPARE_SHIFT )
CERT_FIND_SIGNATURE_HASH	EQU	( CERT_COMPARE_SIGNATURE_HASH  shl  CERT_COMPARE_SHIFT )
CERT_FIND_KEY_IDENTIFIER	EQU	( CERT_COMPARE_KEY_IDENTIFIER  shl  CERT_COMPARE_SHIFT )
CERT_FIND_HASH	EQU	<CERT_FIND_SHA1_HASH>
CERT_FIND_PROPERTY	EQU	( CERT_COMPARE_PROPERTY  shl  CERT_COMPARE_SHIFT )
CERT_FIND_PUBLIC_KEY	EQU	( CERT_COMPARE_PUBLIC_KEY  shl  CERT_COMPARE_SHIFT )
CERT_FIND_SUBJECT_NAME	EQU	( CERT_COMPARE_NAME  shl  CERT_COMPARE_SHIFT  or  CERT_INFO_SUBJECT_FLAG )
CERT_FIND_SUBJECT_ATTR	EQU	( CERT_COMPARE_ATTR  shl  CERT_COMPARE_SHIFT  or  CERT_INFO_SUBJECT_FLAG )
CERT_FIND_ISSUER_NAME	EQU	( CERT_COMPARE_NAME  shl  CERT_COMPARE_SHIFT  or  CERT_INFO_ISSUER_FLAG )
CERT_FIND_ISSUER_ATTR	EQU	( CERT_COMPARE_ATTR  shl  CERT_COMPARE_SHIFT  or  CERT_INFO_ISSUER_FLAG )
CERT_FIND_SUBJECT_STR_A	EQU	( CERT_COMPARE_NAME_STR_A  shl  CERT_COMPARE_SHIFT  or  CERT_INFO_SUBJECT_FLAG )
CERT_FIND_SUBJECT_STR_W	EQU	( CERT_COMPARE_NAME_STR_W  shl  CERT_COMPARE_SHIFT  or  CERT_INFO_SUBJECT_FLAG )
CERT_FIND_SUBJECT_STR	EQU	<CERT_FIND_SUBJECT_STR_W>
CERT_FIND_ISSUER_STR_A	EQU	( CERT_COMPARE_NAME_STR_A  shl  CERT_COMPARE_SHIFT  or  CERT_INFO_ISSUER_FLAG )
CERT_FIND_ISSUER_STR_W	EQU	( CERT_COMPARE_NAME_STR_W  shl  CERT_COMPARE_SHIFT  or  CERT_INFO_ISSUER_FLAG )
CERT_FIND_ISSUER_STR	EQU	<CERT_FIND_ISSUER_STR_W>
CERT_FIND_KEY_SPEC	EQU	( CERT_COMPARE_KEY_SPEC  shl  CERT_COMPARE_SHIFT )
CERT_FIND_ENHKEY_USAGE	EQU	( CERT_COMPARE_ENHKEY_USAGE  shl  CERT_COMPARE_SHIFT )
CERT_FIND_CTL_USAGE	EQU	<CERT_FIND_ENHKEY_USAGE>
CERT_FIND_SUBJECT_CERT	EQU	( CERT_COMPARE_SUBJECT_CERT  shl  CERT_COMPARE_SHIFT )
CERT_FIND_ISSUER_OF	EQU	( CERT_COMPARE_ISSUER_OF  shl  CERT_COMPARE_SHIFT )
CERT_FIND_EXISTING	EQU	( CERT_COMPARE_EXISTING  shl  CERT_COMPARE_SHIFT )
CERT_FIND_CERT_ID	EQU	( CERT_COMPARE_CERT_ID  shl  CERT_COMPARE_SHIFT )
CERT_FIND_CROSS_CERT_DIST_POINTS	EQU	( CERT_COMPARE_CROSS_CERT_DIST_POINTS  shl  CERT_COMPARE_SHIFT )
CERT_FIND_PUBKEY_MD5_HASH	EQU	( CERT_COMPARE_PUBKEY_MD5_HASH  shl  CERT_COMPARE_SHIFT )
CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG	EQU	1h
CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG	EQU	2h
CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG	EQU	4h
CERT_FIND_NO_ENHKEY_USAGE_FLAG	EQU	8h
CERT_FIND_OR_ENHKEY_USAGE_FLAG	EQU	10h
CERT_FIND_VALID_ENHKEY_USAGE_FLAG	EQU	20h
CERT_FIND_OPTIONAL_CTL_USAGE_FLAG	EQU	<CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG>
CERT_FIND_EXT_ONLY_CTL_USAGE_FLAG	EQU	<CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG>
CERT_FIND_PROP_ONLY_CTL_USAGE_FLAG	EQU	<CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG>
CERT_FIND_NO_CTL_USAGE_FLAG	EQU	<CERT_FIND_NO_ENHKEY_USAGE_FLAG>
CERT_FIND_OR_CTL_USAGE_FLAG	EQU	<CERT_FIND_OR_ENHKEY_USAGE_FLAG>
CERT_FIND_VALID_CTL_USAGE_FLAG	EQU	<CERT_FIND_VALID_ENHKEY_USAGE_FLAG>
@DefProto WINCRYPT32API, CertGetIssuerCertificateFromStore, stdcall, , <:HCERTSTORE, :PCCERT_CONTEXT, :PCCERT_CONTEXT, :ptr DWORD>, 16
@DefProto WINCRYPT32API, CertVerifySubjectCertificateContext, stdcall, , <:PCCERT_CONTEXT, :PCCERT_CONTEXT, :ptr DWORD>, 12
@DefProto WINCRYPT32API, CertDuplicateCertificateContext, stdcall, , <:PCCERT_CONTEXT>, 4
@DefProto WINCRYPT32API, CertCreateCertificateContext, stdcall, , <:DWORD, :ptr BYTE, :DWORD>, 12
@DefProto WINCRYPT32API, CertFreeCertificateContext, stdcall, , <:PCCERT_CONTEXT>, 4
@DefProto WINCRYPT32API, CertSetCertificateContextProperty, stdcall, , <:PCCERT_CONTEXT, :DWORD, :DWORD, :ptr >, 16
CERT_SET_PROPERTY_IGNORE_PERSIST_ERROR_FLAG	EQU	80000000h
CERT_SET_PROPERTY_INHIBIT_PERSIST_FLAG	EQU	40000000h
@DefProto WINCRYPT32API, CertGetCertificateContextProperty, stdcall, , <:PCCERT_CONTEXT, :DWORD, :ptr , :ptr DWORD>, 16
@DefProto WINCRYPT32API, CertEnumCertificateContextProperties, stdcall, , <:PCCERT_CONTEXT, :DWORD>, 8
@DefProto WINCRYPT32API, CertCreateCTLEntryFromCertificateContextProperties, stdcall, , <:PCCERT_CONTEXT, :DWORD, :PCRYPT_ATTRIBUTE, :DWORD, :ptr , :PCTL_ENTRY, :ptr DWORD>, 28
CTL_ENTRY_FROM_PROP_CHAIN_FLAG	EQU	1h
@DefProto WINCRYPT32API, CertSetCertificateContextPropertiesFromCTLEntry, stdcall, , <:PCCERT_CONTEXT, :PCTL_ENTRY, :DWORD>, 12
@DefProto WINCRYPT32API, CertGetCRLFromStore, stdcall, , <:HCERTSTORE, :PCCERT_CONTEXT, :PCCRL_CONTEXT, :ptr DWORD>, 16
@DefProto WINCRYPT32API, CertEnumCRLsInStore, stdcall, , <:HCERTSTORE, :PCCRL_CONTEXT>, 8
@DefProto WINCRYPT32API, CertFindCRLInStore, stdcall, , <:HCERTSTORE, :DWORD, :DWORD, :DWORD, :ptr , :PCCRL_CONTEXT>, 24
CRL_FIND_ANY	EQU	0
CRL_FIND_ISSUED_BY	EQU	1
CRL_FIND_EXISTING	EQU	2
CRL_FIND_ISSUED_FOR	EQU	3
CRL_FIND_ISSUED_BY_AKI_FLAG	EQU	1h
CRL_FIND_ISSUED_BY_SIGNATURE_FLAG	EQU	2h
CRL_FIND_ISSUED_BY_DELTA_FLAG	EQU	4h
CRL_FIND_ISSUED_BY_BASE_FLAG	EQU	8h
CRL_FIND_ISSUED_FOR_PARA	struct 
pSubjectCert	PCCERT_CONTEXT	?
pIssuerCert	PCCERT_CONTEXT	?
CRL_FIND_ISSUED_FOR_PARA	ends

PCRL_FIND_ISSUED_FOR_PARA typedef ptr CRL_FIND_ISSUED_FOR_PARA

@DefProto WINCRYPT32API, CertDuplicateCRLContext, stdcall, , <:PCCRL_CONTEXT>, 4
@DefProto WINCRYPT32API, CertCreateCRLContext, stdcall, , <:DWORD, :ptr BYTE, :DWORD>, 12
@DefProto WINCRYPT32API, CertFreeCRLContext, stdcall, , <:PCCRL_CONTEXT>, 4
@DefProto WINCRYPT32API, CertSetCRLContextProperty, stdcall, , <:PCCRL_CONTEXT, :DWORD, :DWORD, :ptr >, 16
@DefProto WINCRYPT32API, CertGetCRLContextProperty, stdcall, , <:PCCRL_CONTEXT, :DWORD, :ptr , :ptr DWORD>, 16
@DefProto WINCRYPT32API, CertEnumCRLContextProperties, stdcall, , <:PCCRL_CONTEXT, :DWORD>, 8
@DefProto WINCRYPT32API, CertFindCertificateInCRL, stdcall, , <:PCCERT_CONTEXT, :PCCRL_CONTEXT, :DWORD, :ptr , :ptr PCRL_ENTRY>, 20
@DefProto WINCRYPT32API, CertIsValidCRLForCertificate, stdcall, , <:PCCERT_CONTEXT, :PCCRL_CONTEXT, :DWORD, :ptr >, 16
CERT_STORE_ADD_NEW	EQU	1
CERT_STORE_ADD_USE_EXISTING	EQU	2
CERT_STORE_ADD_REPLACE_EXISTING	EQU	3
CERT_STORE_ADD_ALWAYS	EQU	4
CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES	EQU	5
CERT_STORE_ADD_NEWER	EQU	6
CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES	EQU	7
@DefProto WINCRYPT32API, CertAddEncodedCertificateToStore, stdcall, , <:HCERTSTORE, :DWORD, :ptr BYTE, :DWORD, :DWORD, :ptr PCCERT_CONTEXT>, 24
@DefProto WINCRYPT32API, CertAddCertificateContextToStore, stdcall, , <:HCERTSTORE, :PCCERT_CONTEXT, :DWORD, :ptr PCCERT_CONTEXT>, 16
CERT_STORE_CERTIFICATE_CONTEXT	EQU	1
CERT_STORE_CRL_CONTEXT	EQU	2
CERT_STORE_CTL_CONTEXT	EQU	3
CERT_STORE_ALL_CONTEXT_FLAG	EQU	<(  not  0 )>
CERT_STORE_CERTIFICATE_CONTEXT_FLAG	EQU	( 1  shl  CERT_STORE_CERTIFICATE_CONTEXT )
CERT_STORE_CRL_CONTEXT_FLAG	EQU	( 1  shl  CERT_STORE_CRL_CONTEXT )
CERT_STORE_CTL_CONTEXT_FLAG	EQU	( 1  shl  CERT_STORE_CTL_CONTEXT )
@DefProto WINCRYPT32API, CertAddSerializedElementToStore, stdcall, , <:HCERTSTORE, :ptr BYTE, :DWORD, :DWORD, :DWORD, :DWORD, :ptr DWORD, :ptr ptr >, 32
@DefProto WINCRYPT32API, CertDeleteCertificateFromStore, stdcall, , <:PCCERT_CONTEXT>, 4
@DefProto WINCRYPT32API, CertAddEncodedCRLToStore, stdcall, , <:HCERTSTORE, :DWORD, :ptr BYTE, :DWORD, :DWORD, :ptr PCCRL_CONTEXT>, 24
@DefProto WINCRYPT32API, CertAddCRLContextToStore, stdcall, , <:HCERTSTORE, :PCCRL_CONTEXT, :DWORD, :ptr PCCRL_CONTEXT>, 16
@DefProto WINCRYPT32API, CertDeleteCRLFromStore, stdcall, , <:PCCRL_CONTEXT>, 4
@DefProto WINCRYPT32API, CertSerializeCertificateStoreElement, stdcall, , <:PCCERT_CONTEXT, :DWORD, :ptr BYTE, :ptr DWORD>, 16
@DefProto WINCRYPT32API, CertSerializeCRLStoreElement, stdcall, , <:PCCRL_CONTEXT, :DWORD, :ptr BYTE, :ptr DWORD>, 16
@DefProto WINCRYPT32API, CertDuplicateCTLContext, stdcall, , <:PCCTL_CONTEXT>, 4
@DefProto WINCRYPT32API, CertCreateCTLContext, stdcall, , <:DWORD, :ptr BYTE, :DWORD>, 12
@DefProto WINCRYPT32API, CertFreeCTLContext, stdcall, , <:PCCTL_CONTEXT>, 4
@DefProto WINCRYPT32API, CertSetCTLContextProperty, stdcall, , <:PCCTL_CONTEXT, :DWORD, :DWORD, :ptr >, 16
@DefProto WINCRYPT32API, CertGetCTLContextProperty, stdcall, , <:PCCTL_CONTEXT, :DWORD, :ptr , :ptr DWORD>, 16
@DefProto WINCRYPT32API, CertEnumCTLContextProperties, stdcall, , <:PCCTL_CONTEXT, :DWORD>, 8
@DefProto WINCRYPT32API, CertEnumCTLsInStore, stdcall, , <:HCERTSTORE, :PCCTL_CONTEXT>, 8
@DefProto WINCRYPT32API, CertFindSubjectInCTL, stdcall, , <:DWORD, :DWORD, :ptr , :PCCTL_CONTEXT, :DWORD>, 20
CTL_ANY_SUBJECT_TYPE	EQU	1
CTL_CERT_SUBJECT_TYPE	EQU	2
CTL_ANY_SUBJECT_INFO	struct 
SubjectAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
SubjectIdentifier	CRYPT_DATA_BLOB	<>
CTL_ANY_SUBJECT_INFO	ends

PCTL_ANY_SUBJECT_INFO typedef ptr CTL_ANY_SUBJECT_INFO

@DefProto WINCRYPT32API, CertFindCTLInStore, stdcall, , <:HCERTSTORE, :DWORD, :DWORD, :DWORD, :ptr , :PCCTL_CONTEXT>, 24
CTL_FIND_ANY	EQU	0
CTL_FIND_SHA1_HASH	EQU	1
CTL_FIND_MD5_HASH	EQU	2
CTL_FIND_USAGE	EQU	3
CTL_FIND_SUBJECT	EQU	4
CTL_FIND_EXISTING	EQU	5
CTL_FIND_USAGE_PARA	struct 
cbSize	DWORD	?
SubjectUsage	CTL_USAGE	<>
ListIdentifier	CRYPT_DATA_BLOB	<>
pSigner	PCERT_INFO	?
CTL_FIND_USAGE_PARA	ends

PCTL_FIND_USAGE_PARA typedef ptr CTL_FIND_USAGE_PARA

CTL_FIND_NO_LIST_ID_CBDATA	EQU	0FFFFFFFFh
CTL_FIND_NO_SIGNER_PTR	EQU	( ( PCERT_INFO ) - 1 )
CTL_FIND_SAME_USAGE_FLAG	EQU	1h
CTL_FIND_SUBJECT_PARA	struct 
cbSize	DWORD	?
pUsagePara	PCTL_FIND_USAGE_PARA	?
dwSubjectType	DWORD	?
pvSubject	DWORD	?
CTL_FIND_SUBJECT_PARA	ends

PCTL_FIND_SUBJECT_PARA typedef ptr CTL_FIND_SUBJECT_PARA

@DefProto WINCRYPT32API, CertAddEncodedCTLToStore, stdcall, , <:HCERTSTORE, :DWORD, :ptr BYTE, :DWORD, :DWORD, :ptr PCCTL_CONTEXT>, 24
@DefProto WINCRYPT32API, CertAddCTLContextToStore, stdcall, , <:HCERTSTORE, :PCCTL_CONTEXT, :DWORD, :ptr PCCTL_CONTEXT>, 16
@DefProto WINCRYPT32API, CertSerializeCTLStoreElement, stdcall, , <:PCCTL_CONTEXT, :DWORD, :ptr BYTE, :ptr DWORD>, 16
@DefProto WINCRYPT32API, CertDeleteCTLFromStore, stdcall, , <:PCCTL_CONTEXT>, 4
@DefProto WINCRYPT32API, CertAddCertificateLinkToStore, stdcall, , <:HCERTSTORE, :PCCERT_CONTEXT, :DWORD, :ptr PCCERT_CONTEXT>, 16
@DefProto WINCRYPT32API, CertAddCRLLinkToStore, stdcall, , <:HCERTSTORE, :PCCRL_CONTEXT, :DWORD, :ptr PCCRL_CONTEXT>, 16
@DefProto WINCRYPT32API, CertAddCTLLinkToStore, stdcall, , <:HCERTSTORE, :PCCTL_CONTEXT, :DWORD, :ptr PCCTL_CONTEXT>, 16
@DefProto WINCRYPT32API, CertAddStoreToCollection, stdcall, , <:HCERTSTORE, :HCERTSTORE, :DWORD, :DWORD>, 16
@DefProto WINCRYPT32API, CertRemoveStoreFromCollection, stdcall, , <:HCERTSTORE, :HCERTSTORE>, 8
@DefProto WINCRYPT32API, CertControlStore, stdcall, , <:HCERTSTORE, :DWORD, :DWORD, :ptr >, 16
CERT_STORE_CTRL_RESYNC	EQU	1
CERT_STORE_CTRL_NOTIFY_CHANGE	EQU	2
CERT_STORE_CTRL_COMMIT	EQU	3
CERT_STORE_CTRL_AUTO_RESYNC	EQU	4
CERT_STORE_CTRL_CANCEL_NOTIFY	EQU	5
CERT_STORE_CTRL_INHIBIT_DUPLICATE_HANDLE_FLAG	EQU	1h
CERT_STORE_CTRL_COMMIT_FORCE_FLAG	EQU	1h
CERT_STORE_CTRL_COMMIT_CLEAR_FLAG	EQU	2h
CERT_STORE_LOCALIZED_NAME_PROP_ID	EQU	1000h
@DefProto WINCRYPT32API, CertSetStoreProperty, stdcall, , <:HCERTSTORE, :DWORD, :DWORD, :ptr >, 16
@DefProto WINCRYPT32API, CertGetStoreProperty, stdcall, , <:HCERTSTORE, :DWORD, :ptr , :ptr DWORD>, 16
CERT_CREATE_CONTEXT_PARA	struct 
cbSize	DWORD	?
pfnFree	PFN_CRYPT_FREE	?
pvFree	DWORD	?
CERT_CREATE_CONTEXT_PARA	ends

PCERT_CREATE_CONTEXT_PARA typedef ptr CERT_CREATE_CONTEXT_PARA

@DefProto WINCRYPT32API, CertCreateContext, stdcall, , <:DWORD, :DWORD, :ptr BYTE, :DWORD, :DWORD, :PCERT_CREATE_CONTEXT_PARA>, 24
CERT_CREATE_CONTEXT_NOCOPY_FLAG	EQU	1h
CERT_CREATE_CONTEXT_SORTED_FLAG	EQU	2h
CERT_CREATE_CONTEXT_NO_HCRYPTMSG_FLAG	EQU	4h
CERT_CREATE_CONTEXT_NO_ENTRY_FLAG	EQU	8h
CERT_SYSTEM_STORE_INFO	struct 
cbSize	DWORD	?
CERT_SYSTEM_STORE_INFO	ends

PCERT_SYSTEM_STORE_INFO typedef ptr CERT_SYSTEM_STORE_INFO

CERT_PHYSICAL_STORE_INFO	struct 
cbSize	DWORD	?
pszOpenStoreProvider	LPSTR	?
dwOpenEncodingType	DWORD	?
dwOpenFlags	DWORD	?
OpenParameters	CRYPT_DATA_BLOB	<>
dwFlags	DWORD	?
dwPriority	DWORD	?
CERT_PHYSICAL_STORE_INFO	ends

PCERT_PHYSICAL_STORE_INFO typedef ptr CERT_PHYSICAL_STORE_INFO

CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG	EQU	1h
CERT_PHYSICAL_STORE_OPEN_DISABLE_FLAG	EQU	2h
CERT_PHYSICAL_STORE_REMOTE_OPEN_DISABLE_FLAG	EQU	4h
CERT_PHYSICAL_STORE_INSERT_COMPUTER_NAME_ENABLE_FLAG	EQU	8h
@DefProto WINCRYPT32API, CertRegisterSystemStore, stdcall, , <:ptr , :DWORD, :PCERT_SYSTEM_STORE_INFO, :ptr >, 16
@DefProto WINCRYPT32API, CertRegisterPhysicalStore, stdcall, , <:ptr , :DWORD, :LPWSTR, :PCERT_PHYSICAL_STORE_INFO, :ptr >, 20
@DefProto WINCRYPT32API, CertUnregisterSystemStore, stdcall, , <:ptr , :DWORD>, 8
@DefProto WINCRYPT32API, CertUnregisterPhysicalStore, stdcall, , <:ptr , :DWORD, :LPWSTR>, 12
proto_PFN_CERT_ENUM_SYSTEM_STORE_LOCATION typedef proto stdcall :LPWSTR,:DWORD,:ptr ,:ptr 
PFN_CERT_ENUM_SYSTEM_STORE_LOCATION typedef ptr proto_PFN_CERT_ENUM_SYSTEM_STORE_LOCATION
proto_PFN_CERT_ENUM_SYSTEM_STORE typedef proto stdcall :ptr ,:DWORD,:PCERT_SYSTEM_STORE_INFO,:ptr ,:ptr 
PFN_CERT_ENUM_SYSTEM_STORE typedef ptr proto_PFN_CERT_ENUM_SYSTEM_STORE
proto_PFN_CERT_ENUM_PHYSICAL_STORE typedef proto stdcall :ptr ,:DWORD,:LPWSTR,:PCERT_PHYSICAL_STORE_INFO,:ptr ,:ptr 
PFN_CERT_ENUM_PHYSICAL_STORE typedef ptr proto_PFN_CERT_ENUM_PHYSICAL_STORE
CERT_PHYSICAL_STORE_PREDEFINED_ENUM_FLAG	EQU	1h
CERT_PHYSICAL_STORE_DEFAULT_NAME	EQU	<L(".Default")>
CERT_PHYSICAL_STORE_GROUP_POLICY_NAME	EQU	<L(".GroupPolicy")>
CERT_PHYSICAL_STORE_LOCAL_MACHINE_NAME	EQU	<L(".LocalMachine")>
CERT_PHYSICAL_STORE_DS_USER_CERTIFICATE_NAME	EQU	<L(".UserCertificate")>
CERT_PHYSICAL_STORE_LOCAL_MACHINE_GROUP_POLICY_NAME	EQU	<L(".LocalMachineGroupPolicy")>
CERT_PHYSICAL_STORE_ENTERPRISE_NAME	EQU	<L(".Enterprise")>
CERT_PHYSICAL_STORE_AUTH_ROOT_NAME	EQU	<L(".AuthRoot")>
@DefProto WINCRYPT32API, CertEnumSystemStoreLocation, stdcall, , <:DWORD, :ptr , :PFN_CERT_ENUM_SYSTEM_STORE_LOCATION>, 12
@DefProto WINCRYPT32API, CertEnumSystemStore, stdcall, , <:DWORD, :ptr , :ptr , :PFN_CERT_ENUM_SYSTEM_STORE>, 16
@DefProto WINCRYPT32API, CertEnumPhysicalStore, stdcall, , <:ptr , :DWORD, :ptr , :PFN_CERT_ENUM_PHYSICAL_STORE>, 16
CRYPT_OID_OPEN_SYSTEM_STORE_PROV_FUNC	EQU	<"CertDllOpenSystemStoreProv">
CRYPT_OID_REGISTER_SYSTEM_STORE_FUNC	EQU	<"CertDllRegisterSystemStore">
CRYPT_OID_UNREGISTER_SYSTEM_STORE_FUNC	EQU	<"CertDllUnregisterSystemStore">
CRYPT_OID_ENUM_SYSTEM_STORE_FUNC	EQU	<"CertDllEnumSystemStore">
CRYPT_OID_REGISTER_PHYSICAL_STORE_FUNC	EQU	<"CertDllRegisterPhysicalStore">
CRYPT_OID_UNREGISTER_PHYSICAL_STORE_FUNC	EQU	<"CertDllUnregisterPhysicalStore">
CRYPT_OID_ENUM_PHYSICAL_STORE_FUNC	EQU	<"CertDllEnumPhysicalStore">
CRYPT_OID_SYSTEM_STORE_LOCATION_VALUE_NAME	EQU	<L("SystemStoreLocation")>
@DefProto WINCRYPT32API, CertGetEnhancedKeyUsage, stdcall, , <:PCCERT_CONTEXT, :DWORD, :PCERT_ENHKEY_USAGE, :ptr DWORD>, 16
@DefProto WINCRYPT32API, CertSetEnhancedKeyUsage, stdcall, , <:PCCERT_CONTEXT, :PCERT_ENHKEY_USAGE>, 8
@DefProto WINCRYPT32API, CertAddEnhancedKeyUsageIdentifier, stdcall, , <:PCCERT_CONTEXT, :LPSTR>, 8
@DefProto WINCRYPT32API, CertRemoveEnhancedKeyUsageIdentifier, stdcall, , <:PCCERT_CONTEXT, :LPSTR>, 8
@DefProto WINCRYPT32API, CertGetValidUsages, stdcall, , <:DWORD, :ptr PCCERT_CONTEXT, :ptr DWORD, :ptr LPSTR, :ptr DWORD>, 20
@DefProto WINCRYPT32API, CryptMsgGetAndVerifySigner, stdcall, , <:HCRYPTMSG, :DWORD, :ptr HCERTSTORE, :DWORD, :ptr PCCERT_CONTEXT, :ptr DWORD>, 24
CMSG_TRUSTED_SIGNER_FLAG	EQU	1h
CMSG_SIGNER_ONLY_FLAG	EQU	2h
CMSG_USE_SIGNER_INDEX_FLAG	EQU	4h
@DefProto WINCRYPT32API, CryptMsgSignCTL, stdcall, , <:DWORD, :ptr BYTE, :DWORD, :PCMSG_SIGNED_ENCODE_INFO, :DWORD, :ptr BYTE, :ptr DWORD>, 28
CMSG_CMS_ENCAPSULATED_CTL_FLAG	EQU	00008000h
@DefProto WINCRYPT32API, CryptMsgEncodeAndSignCTL, stdcall, , <:DWORD, :PCTL_INFO, :PCMSG_SIGNED_ENCODE_INFO, :DWORD, :ptr BYTE, :ptr DWORD>, 24
CMSG_ENCODE_SORTED_CTL_FLAG	EQU	1h
CMSG_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG	EQU	2h
@DefProto WINCRYPT32API, CertFindSubjectInSortedCTL, stdcall, , <:PCRYPT_DATA_BLOB, :PCCTL_CONTEXT, :DWORD, :ptr , :PCRYPT_DER_BLOB>, 20
@DefProto WINCRYPT32API, CertEnumSubjectInSortedCTL, stdcall, , <:PCCTL_CONTEXT, :ptr ptr , :PCRYPT_DER_BLOB, :PCRYPT_DER_BLOB>, 16
CTL_VERIFY_USAGE_PARA	struct 
cbSize	DWORD	?
ListIdentifier	CRYPT_DATA_BLOB	<>
cCtlStore	DWORD	?
rghCtlStore	DWORD	?
cSignerStore	DWORD	?
rghSignerStore	DWORD	?
CTL_VERIFY_USAGE_PARA	ends

PCTL_VERIFY_USAGE_PARA typedef ptr CTL_VERIFY_USAGE_PARA

CTL_VERIFY_USAGE_STATUS	struct 
cbSize	DWORD	?
dwError	DWORD	?
dwFlags	DWORD	?
ppCtl	DWORD	?
dwCtlEntryIndex	DWORD	?
ppSigner	DWORD	?
dwSignerIndex	DWORD	?
CTL_VERIFY_USAGE_STATUS	ends

PCTL_VERIFY_USAGE_STATUS typedef ptr CTL_VERIFY_USAGE_STATUS

CERT_VERIFY_INHIBIT_CTL_UPDATE_FLAG	EQU	1h
CERT_VERIFY_TRUSTED_SIGNERS_FLAG	EQU	2h
CERT_VERIFY_NO_TIME_CHECK_FLAG	EQU	4h
CERT_VERIFY_ALLOW_MORE_USAGE_FLAG	EQU	8h
CERT_VERIFY_UPDATED_CTL_FLAG	EQU	1h
@DefProto WINCRYPT32API, CertVerifyCTLUsage, stdcall, , <:DWORD, :DWORD, :ptr , :PCTL_USAGE, :DWORD, :PCTL_VERIFY_USAGE_PARA, :PCTL_VERIFY_USAGE_STATUS>, 28
CERT_REVOCATION_CRL_INFO	struct 
cbSize	DWORD	?
pBaseCrlContext	PCCRL_CONTEXT	?
pDeltaCrlContext	PCCRL_CONTEXT	?
pCrlEntry	PCRL_ENTRY	?
fDeltaCrlEntry	BOOL	?
CERT_REVOCATION_CRL_INFO	ends

PCERT_REVOCATION_CRL_INFO typedef ptr CERT_REVOCATION_CRL_INFO

CERT_REVOCATION_PARA	struct 
cbSize	DWORD	?
pIssuerCert	PCCERT_CONTEXT	?
cCertStore	DWORD	?
rgCertStore	DWORD	?
hCrlStore	HCERTSTORE	?
pftTimeToUse	LPFILETIME	?
ifdef CERT_REVOCATION_PARA_HAS_EXTRA_FIELDS
dwUrlRetrievalTimeout	DWORD	?
fCheckFreshnessTime	BOOL	?
dwFreshnessTime	DWORD	?
pftCurrentTime	LPFILETIME	?
pCrlInfo	PCERT_REVOCATION_CRL_INFO	?
endif 
CERT_REVOCATION_PARA	ends

PCERT_REVOCATION_PARA typedef ptr CERT_REVOCATION_PARA

CERT_REVOCATION_STATUS	struct 
cbSize	DWORD	?
dwIndex	DWORD	?
dwError	DWORD	?
dwReason	DWORD	?
fHasFreshnessTime	BOOL	?
dwFreshnessTime	DWORD	?
CERT_REVOCATION_STATUS	ends

PCERT_REVOCATION_STATUS typedef ptr CERT_REVOCATION_STATUS

@DefProto WINCRYPT32API, CertVerifyRevocation, stdcall, , <:DWORD, :DWORD, :DWORD, :ptr PVOID, :DWORD, :PCERT_REVOCATION_PARA, :PCERT_REVOCATION_STATUS>, 28
CERT_CONTEXT_REVOCATION_TYPE	EQU	1
CERT_VERIFY_REV_CHAIN_FLAG	EQU	00000001h
CERT_VERIFY_CACHE_ONLY_BASED_REVOCATION	EQU	00000002h
CERT_VERIFY_REV_ACCUMULATIVE_TIMEOUT_FLAG	EQU	00000004h
CertCompareIntegerBlob proto stdcall :PCRYPT_INTEGER_BLOB, :PCRYPT_INTEGER_BLOB
@DefProto WINCRYPT32API, CertCompareCertificate, stdcall, , <:DWORD, :PCERT_INFO, :PCERT_INFO>, 12
@DefProto WINCRYPT32API, CertCompareCertificateName, stdcall, , <:DWORD, :PCERT_NAME_BLOB, :PCERT_NAME_BLOB>, 12
@DefProto WINCRYPT32API, CertIsRDNAttrsInCertificateName, stdcall, , <:DWORD, :DWORD, :PCERT_NAME_BLOB, :PCERT_RDN>, 16
CERT_UNICODE_IS_RDN_ATTRS_FLAG	EQU	1h
CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG	EQU	2h
@DefProto WINCRYPT32API, CertComparePublicKeyInfo, stdcall, , <:DWORD, :PCERT_PUBLIC_KEY_INFO, :PCERT_PUBLIC_KEY_INFO>, 12
@DefProto WINCRYPT32API, CertGetPublicKeyLength, stdcall, , <:DWORD, :PCERT_PUBLIC_KEY_INFO>, 8
@DefProto WINCRYPT32API, CryptVerifyCertificateSignature, stdcall, , <:HCRYPTPROV, :DWORD, :ptr BYTE, :DWORD, :PCERT_PUBLIC_KEY_INFO>, 20
@DefProto WINCRYPT32API, CryptVerifyCertificateSignatureEx, stdcall, , <:HCRYPTPROV, :DWORD, :DWORD, :ptr , :DWORD, :ptr , :DWORD, :ptr >, 32
CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB	EQU	1
CRYPT_VERIFY_CERT_SIGN_SUBJECT_CERT	EQU	2
CRYPT_VERIFY_CERT_SIGN_SUBJECT_CRL	EQU	3
CRYPT_VERIFY_CERT_SIGN_ISSUER_PUBKEY	EQU	1
CRYPT_VERIFY_CERT_SIGN_ISSUER_CERT	EQU	2
CRYPT_VERIFY_CERT_SIGN_ISSUER_CHAIN	EQU	3
CRYPT_VERIFY_CERT_SIGN_ISSUER_NULL	EQU	4
@DefProto WINCRYPT32API, CryptHashToBeSigned, stdcall, , <:HCRYPTPROV, :DWORD, :ptr BYTE, :DWORD, :ptr BYTE, :ptr DWORD>, 24
@DefProto WINCRYPT32API, CryptHashCertificate, stdcall, , <:HCRYPTPROV, :ALG_ID, :DWORD, :ptr BYTE, :DWORD, :ptr BYTE, :ptr DWORD>, 28
@DefProto WINCRYPT32API, CryptSignCertificate, stdcall, , <:HCRYPTPROV, :DWORD, :DWORD, :ptr BYTE, :DWORD, :PCRYPT_ALGORITHM_IDENTIFIER, :ptr , :ptr BYTE, :ptr DWORD>, 36
@DefProto WINCRYPT32API, CryptSignAndEncodeCertificate, stdcall, , <:HCRYPTPROV, :DWORD, :DWORD, :LPSTR, :ptr , :PCRYPT_ALGORITHM_IDENTIFIER, :ptr , :PBYTE, :ptr DWORD>, 36
@DefProto WINCRYPT32API, CertVerifyTimeValidity, stdcall, , <:LPFILETIME, :PCERT_INFO>, 8
@DefProto WINCRYPT32API, CertVerifyCRLTimeValidity, stdcall, , <:LPFILETIME, :PCRL_INFO>, 8
@DefProto WINCRYPT32API, CertVerifyValidityNesting, stdcall, , <:PCERT_INFO, :PCERT_INFO>, 8
@DefProto WINCRYPT32API, CertVerifyCRLRevocation, stdcall, , <:DWORD, :PCERT_INFO, :DWORD, :ptr PCRL_INFO>, 16
@DefProto WINCRYPT32API, CertAlgIdToOID, stdcall, , <:DWORD>, 4
@DefProto WINCRYPT32API, CertOIDToAlgId, stdcall, , <:LPSTR>, 4
@DefProto WINCRYPT32API, CertFindExtension, stdcall, , <:LPSTR, :DWORD, :ptr CERT_EXTENSION>, 12
@DefProto WINCRYPT32API, CertFindAttribute, stdcall, , <:LPSTR, :DWORD, :ptr CRYPT_ATTRIBUTE>, 12
@DefProto WINCRYPT32API, CertFindRDNAttr, stdcall, , <:LPSTR, :PCERT_NAME_INFO>, 8
@DefProto WINCRYPT32API, CertGetIntendedKeyUsage, stdcall, , <:DWORD, :PCERT_INFO, :ptr BYTE, :DWORD>, 16
HCRYPTDEFAULTCONTEXT typedef ptr 
@DefProto WINCRYPT32API, CryptInstallDefaultContext, stdcall, , <:HCRYPTPROV, :DWORD, :ptr , :DWORD, :ptr , :ptr HCRYPTDEFAULTCONTEXT>, 24
CRYPT_DEFAULT_CONTEXT_AUTO_RELEASE_FLAG	EQU	00000001h
CRYPT_DEFAULT_CONTEXT_PROCESS_FLAG	EQU	00000002h
CRYPT_DEFAULT_CONTEXT_CERT_SIGN_OID	EQU	1
CRYPT_DEFAULT_CONTEXT_MULTI_CERT_SIGN_OID	EQU	2
CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA	struct 
cOID	DWORD	?
rgpszOID	DWORD	?
CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA	ends

PCRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA typedef ptr CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA

@DefProto WINCRYPT32API, CryptUninstallDefaultContext, stdcall, , <:HCRYPTDEFAULTCONTEXT, :DWORD, :ptr >, 12
@DefProto WINCRYPT32API, CryptExportPublicKeyInfo, stdcall, , <:HCRYPTPROV, :DWORD, :DWORD, :PCERT_PUBLIC_KEY_INFO, :ptr DWORD>, 20
CRYPT_OID_EXPORT_PUBLIC_KEY_INFO_FUNC	EQU	<"CryptDllExportPublicKeyInfoEx">
@DefProto WINCRYPT32API, CryptExportPublicKeyInfoEx, stdcall, , <:HCRYPTPROV, :DWORD, :DWORD, :LPSTR, :DWORD, :ptr , :PCERT_PUBLIC_KEY_INFO, :ptr DWORD>, 32
@DefProto WINCRYPT32API, CryptImportPublicKeyInfo, stdcall, , <:HCRYPTPROV, :DWORD, :PCERT_PUBLIC_KEY_INFO, :ptr HCRYPTKEY>, 16
CRYPT_OID_IMPORT_PUBLIC_KEY_INFO_FUNC	EQU	<"CryptDllImportPublicKeyInfoEx">
@DefProto WINCRYPT32API, CryptImportPublicKeyInfoEx, stdcall, , <:HCRYPTPROV, :DWORD, :PCERT_PUBLIC_KEY_INFO, :ALG_ID, :DWORD, :ptr , :ptr HCRYPTKEY>, 28
@DefProto WINCRYPT32API, CryptAcquireCertificatePrivateKey, stdcall, , <:PCCERT_CONTEXT, :DWORD, :ptr , :ptr HCRYPTPROV, :ptr DWORD, :ptr BOOL>, 24
CRYPT_ACQUIRE_CACHE_FLAG	EQU	00000001h
CRYPT_ACQUIRE_USE_PROV_INFO_FLAG	EQU	00000002h
CRYPT_ACQUIRE_COMPARE_KEY_FLAG	EQU	00000004h
CRYPT_ACQUIRE_SILENT_FLAG	EQU	00000040h
@DefProto WINCRYPT32API, CryptFindCertificateKeyProvInfo, stdcall, , <:PCCERT_CONTEXT, :DWORD, :ptr >, 12
CRYPT_FIND_USER_KEYSET_FLAG	EQU	00000001h
CRYPT_FIND_MACHINE_KEYSET_FLAG	EQU	00000002h
CRYPT_FIND_SILENT_KEYSET_FLAG	EQU	00000040h
proto_PFN_IMPORT_PRIV_KEY_FUNC typedef proto stdcall :HCRYPTPROV,:ptr CRYPT_PRIVATE_KEY_INFO,:DWORD,:ptr 
PFN_IMPORT_PRIV_KEY_FUNC typedef ptr proto_PFN_IMPORT_PRIV_KEY_FUNC
CRYPT_OID_IMPORT_PRIVATE_KEY_INFO_FUNC	EQU	<"CryptDllImportPrivateKeyInfoEx">
@DefProto WINCRYPT32API, CryptImportPKCS8, stdcall, , <:CRYPT_PKCS8_IMPORT_PARAMS, :DWORD, :ptr HCRYPTPROV, :ptr >, 16
proto_PFN_EXPORT_PRIV_KEY_FUNC typedef proto stdcall :HCRYPTPROV,:DWORD,:LPSTR,:DWORD,:ptr ,:ptr CRYPT_PRIVATE_KEY_INFO,:ptr DWORD
PFN_EXPORT_PRIV_KEY_FUNC typedef ptr proto_PFN_EXPORT_PRIV_KEY_FUNC
CRYPT_OID_EXPORT_PRIVATE_KEY_INFO_FUNC	EQU	<"CryptDllExportPrivateKeyInfoEx">
CRYPT_DELETE_KEYSET	EQU	0001h
@DefProto WINCRYPT32API, CryptExportPKCS8, stdcall, , <:HCRYPTPROV, :DWORD, :LPSTR, :DWORD, :ptr , :ptr BYTE, :ptr DWORD>, 28
@DefProto WINCRYPT32API, CryptExportPKCS8Ex, stdcall, , <:ptr CRYPT_PKCS8_EXPORT_PARAMS, :DWORD, :ptr , :ptr BYTE, :ptr DWORD>, 20
@DefProto WINCRYPT32API, CryptHashPublicKeyInfo, stdcall, , <:HCRYPTPROV, :ALG_ID, :DWORD, :DWORD, :PCERT_PUBLIC_KEY_INFO, :ptr BYTE, :ptr DWORD>, 28
@DefProto WINCRYPT32API, CertRDNValueToStrA, stdcall, , <:DWORD, :PCERT_RDN_VALUE_BLOB, :LPSTR, :DWORD>, 16
@DefProto WINCRYPT32API, CertRDNValueToStrW, stdcall, , <:DWORD, :PCERT_RDN_VALUE_BLOB, :LPWSTR, :DWORD>, 16
ifdef UNICODE
CertRDNValueToStr	EQU	<CertRDNValueToStrW>
else 
CertRDNValueToStr	EQU	<CertRDNValueToStrA>
endif 
@DefProto WINCRYPT32API, CertNameToStrA, stdcall, , <:DWORD, :PCERT_NAME_BLOB, :DWORD, :LPSTR, :DWORD>, 20
@DefProto WINCRYPT32API, CertNameToStrW, stdcall, , <:DWORD, :PCERT_NAME_BLOB, :DWORD, :LPWSTR, :DWORD>, 20
ifdef UNICODE
CertNameToStr	EQU	<CertNameToStrW>
else 
CertNameToStr	EQU	<CertNameToStrA>
endif 
CERT_SIMPLE_NAME_STR	EQU	1
CERT_OID_NAME_STR	EQU	2
CERT_X500_NAME_STR	EQU	3
CERT_NAME_STR_SEMICOLON_FLAG	EQU	40000000h
CERT_NAME_STR_NO_PLUS_FLAG	EQU	20000000h
CERT_NAME_STR_NO_QUOTING_FLAG	EQU	10000000h
CERT_NAME_STR_CRLF_FLAG	EQU	08000000h
CERT_NAME_STR_COMMA_FLAG	EQU	04000000h
CERT_NAME_STR_REVERSE_FLAG	EQU	02000000h
CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG	EQU	00010000h
CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG	EQU	00020000h
CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG	EQU	00040000h
@DefProto WINCRYPT32API, CertStrToNameA, stdcall, , <:DWORD, :LPSTR, :DWORD, :ptr , :ptr BYTE, :ptr DWORD, :ptr LPSTR>, 28
@DefProto WINCRYPT32API, CertStrToNameW, stdcall, , <:DWORD, :LPWSTR, :DWORD, :ptr , :ptr BYTE, :ptr DWORD, :ptr LPWSTR>, 28
ifdef UNICODE
CertStrToName	EQU	<CertStrToNameW>
else 
CertStrToName	EQU	<CertStrToNameA>
endif 
@DefProto WINCRYPT32API, CertGetNameStringA, stdcall, , <:PCCERT_CONTEXT, :DWORD, :DWORD, :ptr , :LPSTR, :DWORD>, 24
@DefProto WINCRYPT32API, CertGetNameStringW, stdcall, , <:PCCERT_CONTEXT, :DWORD, :DWORD, :ptr , :LPWSTR, :DWORD>, 24
ifdef UNICODE
CertGetNameString	EQU	<CertGetNameStringW>
else 
CertGetNameString	EQU	<CertGetNameStringA>
endif 
CERT_NAME_EMAIL_TYPE	EQU	1
CERT_NAME_RDN_TYPE	EQU	2
CERT_NAME_ATTR_TYPE	EQU	3
CERT_NAME_SIMPLE_DISPLAY_TYPE	EQU	4
CERT_NAME_FRIENDLY_DISPLAY_TYPE	EQU	5
CERT_NAME_DNS_TYPE	EQU	6
CERT_NAME_URL_TYPE	EQU	7
CERT_NAME_UPN_TYPE	EQU	8
CERT_NAME_ISSUER_FLAG	EQU	1h
CERT_NAME_DISABLE_IE4_UTF8_FLAG	EQU	00010000h
proto_PFN_CRYPT_GET_SIGNER_CERTIFICATE typedef proto stdcall :ptr ,:DWORD,:PCERT_INFO,:HCERTSTORE
PFN_CRYPT_GET_SIGNER_CERTIFICATE typedef ptr proto_PFN_CRYPT_GET_SIGNER_CERTIFICATE
CRYPT_SIGN_MESSAGE_PARA	struct 
cbSize	DWORD	?
dwMsgEncodingType	DWORD	?
pSigningCert	PCCERT_CONTEXT	?
HashAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
pvHashAuxInfo	DWORD	?
cMsgCert	DWORD	?
rgpMsgCert	DWORD	?
cMsgCrl	DWORD	?
rgpMsgCrl	DWORD	?
cAuthAttr	DWORD	?
rgAuthAttr	PCRYPT_ATTRIBUTE	?
cUnauthAttr	DWORD	?
rgUnauthAttr	PCRYPT_ATTRIBUTE	?
dwFlags	DWORD	?
dwInnerContentType	DWORD	?
ifdef CRYPT_SIGN_MESSAGE_PARA_HAS_CMS_FIELDS
HashEncryptionAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
pvHashEncryptionAuxInfo	DWORD	?
endif 
CRYPT_SIGN_MESSAGE_PARA	ends

PCRYPT_SIGN_MESSAGE_PARA typedef ptr CRYPT_SIGN_MESSAGE_PARA

CRYPT_MESSAGE_BARE_CONTENT_OUT_FLAG	EQU	00000001h
CRYPT_MESSAGE_ENCAPSULATED_CONTENT_OUT_FLAG	EQU	00000002h
CRYPT_MESSAGE_KEYID_SIGNER_FLAG	EQU	00000004h
CRYPT_MESSAGE_SILENT_KEYSET_FLAG	EQU	00000040h
CRYPT_VERIFY_MESSAGE_PARA	struct 
cbSize	DWORD	?
dwMsgAndCertEncodingType	DWORD	?
hCryptProv	HCRYPTPROV	?
pfnGetSignerCertificate	PFN_CRYPT_GET_SIGNER_CERTIFICATE	?
pvGetArg	DWORD	?
CRYPT_VERIFY_MESSAGE_PARA	ends

PCRYPT_VERIFY_MESSAGE_PARA typedef ptr CRYPT_VERIFY_MESSAGE_PARA

CRYPT_ENCRYPT_MESSAGE_PARA	struct 
cbSize	DWORD	?
dwMsgEncodingType	DWORD	?
hCryptProv	HCRYPTPROV	?
ContentEncryptionAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
pvEncryptionAuxInfo	DWORD	?
dwFlags	DWORD	?
dwInnerContentType	DWORD	?
CRYPT_ENCRYPT_MESSAGE_PARA	ends

PCRYPT_ENCRYPT_MESSAGE_PARA typedef ptr CRYPT_ENCRYPT_MESSAGE_PARA

CRYPT_MESSAGE_KEYID_RECIPIENT_FLAG	EQU	4h
CRYPT_DECRYPT_MESSAGE_PARA	struct 
cbSize	DWORD	?
dwMsgAndCertEncodingType	DWORD	?
cCertStore	DWORD	?
rghCertStore	DWORD	?
ifdef CRYPT_DECRYPT_MESSAGE_PARA_HAS_EXTRA_FIELDS
dwFlags	DWORD	?
endif 
CRYPT_DECRYPT_MESSAGE_PARA	ends

PCRYPT_DECRYPT_MESSAGE_PARA typedef ptr CRYPT_DECRYPT_MESSAGE_PARA

CRYPT_HASH_MESSAGE_PARA	struct 
cbSize	DWORD	?
dwMsgEncodingType	DWORD	?
hCryptProv	HCRYPTPROV	?
HashAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
pvHashAuxInfo	DWORD	?
CRYPT_HASH_MESSAGE_PARA	ends

PCRYPT_HASH_MESSAGE_PARA typedef ptr CRYPT_HASH_MESSAGE_PARA

CRYPT_KEY_SIGN_MESSAGE_PARA	struct 
cbSize	DWORD	?
dwMsgAndCertEncodingType	DWORD	?
hCryptProv	HCRYPTPROV	?
dwKeySpec	DWORD	?
HashAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
pvHashAuxInfo	DWORD	?
PubKeyAlgorithm	CRYPT_ALGORITHM_IDENTIFIER	<>
CRYPT_KEY_SIGN_MESSAGE_PARA	ends

PCRYPT_KEY_SIGN_MESSAGE_PARA typedef ptr CRYPT_KEY_SIGN_MESSAGE_PARA

CRYPT_KEY_VERIFY_MESSAGE_PARA	struct 
cbSize	DWORD	?
dwMsgEncodingType	DWORD	?
hCryptProv	HCRYPTPROV	?
CRYPT_KEY_VERIFY_MESSAGE_PARA	ends

PCRYPT_KEY_VERIFY_MESSAGE_PARA typedef ptr CRYPT_KEY_VERIFY_MESSAGE_PARA

@DefProto WINCRYPT32API, CryptSignMessage, stdcall, , <:PCRYPT_SIGN_MESSAGE_PARA, :BOOL, :DWORD, :ptr ptr BYTE, :ptr DWORD, :ptr BYTE, :ptr DWORD>, 28
@DefProto WINCRYPT32API, CryptVerifyMessageSignature, stdcall, , <:PCRYPT_VERIFY_MESSAGE_PARA, :DWORD, :ptr BYTE, :DWORD, :ptr BYTE, :ptr DWORD, :ptr PCCERT_CONTEXT>, 28
@DefProto WINCRYPT32API, CryptGetMessageSignerCount, stdcall, , <:DWORD, :ptr BYTE, :DWORD>, 12
@DefProto WINCRYPT32API, CryptGetMessageCertificates, stdcall, , <:DWORD, :HCRYPTPROV, :DWORD, :ptr BYTE, :DWORD>, 20
@DefProto WINCRYPT32API, CryptVerifyDetachedMessageSignature, stdcall, , <:PCRYPT_VERIFY_MESSAGE_PARA, :DWORD, :ptr BYTE, :DWORD, :DWORD, :ptr ptr BYTE, :ptr DWORD, :ptr PCCERT_CONTEXT>, 32
@DefProto WINCRYPT32API, CryptEncryptMessage, stdcall, , <:PCRYPT_ENCRYPT_MESSAGE_PARA, :DWORD, :ptr PCCERT_CONTEXT, :ptr BYTE, :DWORD, :ptr BYTE, :ptr DWORD>, 28
@DefProto WINCRYPT32API, CryptDecryptMessage, stdcall, , <:PCRYPT_DECRYPT_MESSAGE_PARA, :ptr BYTE, :DWORD, :ptr BYTE, :ptr DWORD, :ptr PCCERT_CONTEXT>, 24
@DefProto WINCRYPT32API, CryptSignAndEncryptMessage, stdcall, , <:PCRYPT_SIGN_MESSAGE_PARA, :PCRYPT_ENCRYPT_MESSAGE_PARA, :DWORD, :ptr PCCERT_CONTEXT, :ptr BYTE, :DWORD, :ptr BYTE, :ptr DWORD>, 32
@DefProto WINCRYPT32API, CryptDecryptAndVerifyMessageSignature, stdcall, , <:PCRYPT_DECRYPT_MESSAGE_PARA, :PCRYPT_VERIFY_MESSAGE_PARA, :DWORD, :ptr BYTE, :DWORD, :ptr BYTE, :ptr DWORD, :ptr PCCERT_CONTEXT, :ptr PCCERT_CONTEXT>, 36
@DefProto WINCRYPT32API, CryptDecodeMessage, stdcall, , <:DWORD, :PCRYPT_DECRYPT_MESSAGE_PARA, :PCRYPT_VERIFY_MESSAGE_PARA, :DWORD, :ptr BYTE, :DWORD, :DWORD, :ptr DWORD, :ptr DWORD, :ptr BYTE, :ptr DWORD, :ptr PCCERT_CONTEXT, :ptr PCCERT_CONTEXT>, 52
@DefProto WINCRYPT32API, CryptHashMessage, stdcall, , <:PCRYPT_HASH_MESSAGE_PARA, :BOOL, :DWORD, :ptr ptr BYTE, :ptr DWORD, :ptr BYTE, :ptr DWORD, :ptr BYTE, :ptr DWORD>, 36
@DefProto WINCRYPT32API, CryptVerifyMessageHash, stdcall, , <:PCRYPT_HASH_MESSAGE_PARA, :ptr BYTE, :DWORD, :ptr BYTE, :ptr DWORD, :ptr BYTE, :ptr DWORD>, 28
@DefProto WINCRYPT32API, CryptVerifyDetachedMessageHash, stdcall, , <:PCRYPT_HASH_MESSAGE_PARA, :ptr BYTE, :DWORD, :DWORD, :ptr ptr BYTE, :ptr DWORD, :ptr BYTE, :ptr DWORD>, 32
@DefProto WINCRYPT32API, CryptSignMessageWithKey, stdcall, , <:PCRYPT_KEY_SIGN_MESSAGE_PARA, :ptr BYTE, :DWORD, :ptr BYTE, :ptr DWORD>, 20
@DefProto WINCRYPT32API, CryptVerifyMessageSignatureWithKey, stdcall, , <:PCRYPT_KEY_VERIFY_MESSAGE_PARA, :PCERT_PUBLIC_KEY_INFO, :ptr BYTE, :DWORD, :ptr BYTE, :ptr DWORD>, 24
@DefProto WINCRYPT32API, CertOpenSystemStoreA, stdcall, , <:HCRYPTPROV, :LPSTR>, 8
@DefProto WINCRYPT32API, CertOpenSystemStoreW, stdcall, , <:HCRYPTPROV, :LPWSTR>, 8
ifdef UNICODE
CertOpenSystemStore	EQU	<CertOpenSystemStoreW>
else 
CertOpenSystemStore	EQU	<CertOpenSystemStoreA>
endif 
@DefProto WINCRYPT32API, CertAddEncodedCertificateToSystemStoreA, stdcall, , <:LPSTR, :ptr BYTE, :DWORD>, 12
@DefProto WINCRYPT32API, CertAddEncodedCertificateToSystemStoreW, stdcall, , <:LPWSTR, :ptr BYTE, :DWORD>, 12
ifdef UNICODE
CertAddEncodedCertificateToSystemStore	EQU	<CertAddEncodedCertificateToSystemStoreW>
else 
CertAddEncodedCertificateToSystemStore	EQU	<CertAddEncodedCertificateToSystemStoreA>
endif 
CERT_CHAIN	struct 
cCerts	DWORD	?
certs	PCERT_BLOB	?
keyLocatorInfo	CRYPT_KEY_PROV_INFO	<>
CERT_CHAIN	ends

PCERT_CHAIN typedef ptr CERT_CHAIN

FindCertsByIssuer proto stdcall :PCERT_CHAIN, :ptr DWORD, :ptr DWORD, :ptr BYTE, :DWORD, :LPWSTR, :DWORD
@DefProto WINCRYPT32API, CryptQueryObject, stdcall, , <:DWORD, :ptr , :DWORD, :DWORD, :DWORD, :ptr DWORD, :ptr DWORD, :ptr DWORD, :ptr HCERTSTORE, :ptr HCRYPTMSG, :ptr ptr >, 44
CERT_QUERY_OBJECT_FILE	EQU	00000001h
CERT_QUERY_OBJECT_BLOB	EQU	00000002h
CERT_QUERY_CONTENT_CERT	EQU	1
CERT_QUERY_CONTENT_CTL	EQU	2
CERT_QUERY_CONTENT_CRL	EQU	3
CERT_QUERY_CONTENT_SERIALIZED_STORE	EQU	4
CERT_QUERY_CONTENT_SERIALIZED_CERT	EQU	5
CERT_QUERY_CONTENT_SERIALIZED_CTL	EQU	6
CERT_QUERY_CONTENT_SERIALIZED_CRL	EQU	7
CERT_QUERY_CONTENT_PKCS7_SIGNED	EQU	8
CERT_QUERY_CONTENT_PKCS7_UNSIGNED	EQU	9
CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED	EQU	10
CERT_QUERY_CONTENT_PKCS10	EQU	11
CERT_QUERY_CONTENT_PFX	EQU	12
CERT_QUERY_CONTENT_CERT_PAIR	EQU	13
CERT_QUERY_CONTENT_FLAG_CERT	EQU	( 1  shl  CERT_QUERY_CONTENT_CERT )
CERT_QUERY_CONTENT_FLAG_CTL	EQU	( 1  shl  CERT_QUERY_CONTENT_CTL )
CERT_QUERY_CONTENT_FLAG_CRL	EQU	( 1  shl  CERT_QUERY_CONTENT_CRL )
CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE	EQU	( 1  shl  CERT_QUERY_CONTENT_SERIALIZED_STORE )
CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT	EQU	( 1  shl  CERT_QUERY_CONTENT_SERIALIZED_CERT )
CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL	EQU	( 1  shl  CERT_QUERY_CONTENT_SERIALIZED_CTL )
CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL	EQU	( 1  shl  CERT_QUERY_CONTENT_SERIALIZED_CRL )
CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED	EQU	( 1  shl  CERT_QUERY_CONTENT_PKCS7_SIGNED )
CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED	EQU	( 1  shl  CERT_QUERY_CONTENT_PKCS7_UNSIGNED )
CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED	EQU	( 1  shl  CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED )
CERT_QUERY_CONTENT_FLAG_PKCS10	EQU	( 1  shl  CERT_QUERY_CONTENT_PKCS10 )
CERT_QUERY_CONTENT_FLAG_PFX	EQU	( 1  shl  CERT_QUERY_CONTENT_PFX )
CERT_QUERY_CONTENT_FLAG_CERT_PAIR	EQU	( 1  shl  CERT_QUERY_CONTENT_CERT_PAIR )
;CERT_QUERY_CONTENT_FLAG_ALL	EQU	CERT_QUERY_CONTENT_FLAG_CERT or \
; CERT_QUERY_CONTENT_FLAG_CTL or CERT_QUERY_CONTENT_FLAG_CRL  or \
; CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE  or \
; CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT  or \
; CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL  or \
; CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL  or \
; CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED  or \
; CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED  or \
; CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED  or \
; CERT_QUERY_CONTENT_FLAG_PKCS10  or \
; CERT_QUERY_CONTENT_FLAG_PFX  or \
; CERT_QUERY_CONTENT_FLAG_CERT_PAIR
CERT_QUERY_CONTENT_FLAG_ALL	EQU	-1
CERT_QUERY_FORMAT_BINARY	EQU	1
CERT_QUERY_FORMAT_BASE64_ENCODED	EQU	2
CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED	EQU	3
CERT_QUERY_FORMAT_FLAG_BINARY	EQU	( 1  shl  CERT_QUERY_FORMAT_BINARY )
CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED	EQU	( 1  shl  CERT_QUERY_FORMAT_BASE64_ENCODED )
CERT_QUERY_FORMAT_FLAG_ASN_ASCII_HEX_ENCODED	EQU	( 1  shl  CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED )
CERT_QUERY_FORMAT_FLAG_ALL	EQU	CERT_QUERY_FORMAT_FLAG_BINARY  or  CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED  or  CERT_QUERY_FORMAT_FLAG_ASN_ASCII_HEX_ENCODED
@DefProto WINCRYPT32API, CryptMemAlloc, stdcall, , <:DWORD>, 4
@DefProto WINCRYPT32API, CryptMemRealloc, stdcall, , <:LPVOID, :DWORD>, 8
@DefProto WINCRYPT32API, CryptMemFree, stdcall, , <:LPVOID>, 4
HCRYPTASYNC typedef HANDLE
PHCRYPTASYNC typedef ptr HANDLE
proto_PFN_CRYPT_ASYNC_PARAM_FREE_FUNC typedef proto stdcall :LPSTR,:LPVOID
PFN_CRYPT_ASYNC_PARAM_FREE_FUNC typedef ptr proto_PFN_CRYPT_ASYNC_PARAM_FREE_FUNC
@DefProto WINCRYPT32API, CryptCreateAsyncHandle, stdcall, , <:DWORD, :PHCRYPTASYNC>, 8
@DefProto WINCRYPT32API, CryptSetAsyncParam, stdcall, , <:HCRYPTASYNC, :LPSTR, :LPVOID, :PFN_CRYPT_ASYNC_PARAM_FREE_FUNC>, 16
@DefProto WINCRYPT32API, CryptGetAsyncParam, stdcall, , <:HCRYPTASYNC, :LPSTR, :ptr LPVOID, :ptr PFN_CRYPT_ASYNC_PARAM_FREE_FUNC>, 16
@DefProto WINCRYPT32API, CryptCloseAsyncHandle, stdcall, , <:HCRYPTASYNC>, 4
CRYPT_BLOB_ARRAY	struct 
cBlob	DWORD	?
rgBlob	PCRYPT_DATA_BLOB	?
CRYPT_BLOB_ARRAY	ends

PCRYPT_BLOB_ARRAY typedef ptr CRYPT_BLOB_ARRAY

CRYPT_CREDENTIALS	struct 
cbSize	DWORD	?
pszCredentialsOid	LPSTR	?
pvCredentials	LPVOID	?
CRYPT_CREDENTIALS	ends

PCRYPT_CREDENTIALS typedef ptr CRYPT_CREDENTIALS

CREDENTIAL_OID_PASSWORD_CREDENTIALS_A	EQU	1
CREDENTIAL_OID_PASSWORD_CREDENTIALS_W	EQU	2
ifdef UNICODE
CREDENTIAL_OID_PASSWORD_CREDENTIALS	EQU	<CREDENTIAL_OID_PASSWORD_CREDENTIALS_W>
else 
CREDENTIAL_OID_PASSWORD_CREDENTIALS	EQU	<CREDENTIAL_OID_PASSWORD_CREDENTIALS_A>
endif 
CRYPT_PASSWORD_CREDENTIALSA	struct 
cbSize	DWORD	?
pszUsername	LPSTR	?
pszPassword	LPSTR	?
CRYPT_PASSWORD_CREDENTIALSA	ends

PCRYPT_PASSWORD_CREDENTIALSA typedef ptr CRYPT_PASSWORD_CREDENTIALSA

CRYPT_PASSWORD_CREDENTIALSW	struct 
cbSize	DWORD	?
pszUsername	LPWSTR	?
pszPassword	LPWSTR	?
CRYPT_PASSWORD_CREDENTIALSW	ends

PCRYPT_PASSWORD_CREDENTIALSW typedef ptr CRYPT_PASSWORD_CREDENTIALSW

ifdef UNICODE
CRYPT_PASSWORD_CREDENTIALS typedef CRYPT_PASSWORD_CREDENTIALSW
PCRYPT_PASSWORD_CREDENTIALS typedef PCRYPT_PASSWORD_CREDENTIALSW
else 
CRYPT_PASSWORD_CREDENTIALS typedef CRYPT_PASSWORD_CREDENTIALSA
PCRYPT_PASSWORD_CREDENTIALS typedef PCRYPT_PASSWORD_CREDENTIALSA
endif 
SCHEME_OID_RETRIEVE_ENCODED_OBJECT_FUNC	EQU	<"SchemeDllRetrieveEncodedObject">
proto_PFN_FREE_ENCODED_OBJECT_FUNC typedef proto stdcall :LPSTR,:PCRYPT_BLOB_ARRAY,:LPVOID
PFN_FREE_ENCODED_OBJECT_FUNC typedef ptr proto_PFN_FREE_ENCODED_OBJECT_FUNC
CONTEXT_OID_CREATE_OBJECT_CONTEXT_FUNC	EQU	<"ContextDllCreateObjectContext">
CONTEXT_OID_CERTIFICATE	EQU	1
CONTEXT_OID_CRL	EQU	2
CONTEXT_OID_CTL	EQU	3
CONTEXT_OID_PKCS7	EQU	4
CONTEXT_OID_CAPI2_ANY	EQU	5
CRYPT_RETRIEVE_MULTIPLE_OBJECTS	EQU	00000001h
CRYPT_CACHE_ONLY_RETRIEVAL	EQU	00000002h
CRYPT_WIRE_ONLY_RETRIEVAL	EQU	00000004h
CRYPT_DONT_CACHE_RESULT	EQU	00000008h
CRYPT_ASYNC_RETRIEVAL	EQU	00000010h
CRYPT_STICKY_CACHE_RETRIEVAL	EQU	00001000h
CRYPT_LDAP_SCOPE_BASE_ONLY_RETRIEVAL	EQU	00002000h
CRYPT_OFFLINE_CHECK_RETRIEVAL	EQU	00004000h
CRYPT_LDAP_INSERT_ENTRY_ATTRIBUTE	EQU	00008000h
CRYPT_LDAP_SIGN_RETRIEVAL	EQU	00010000h
CRYPT_NO_AUTH_RETRIEVAL	EQU	00020000h
CRYPT_LDAP_AREC_EXCLUSIVE_RETRIEVAL	EQU	00040000h
CRYPT_VERIFY_CONTEXT_SIGNATURE	EQU	00000020h
CRYPT_VERIFY_DATA_HASH	EQU	00000040h
CRYPT_KEEP_TIME_VALID	EQU	00000080h
CRYPT_DONT_VERIFY_SIGNATURE	EQU	00000100h
CRYPT_DONT_CHECK_TIME_VALIDITY	EQU	00000200h
CRYPT_CHECK_FRESHNESS_TIME_VALIDITY	EQU	00000400h
CRYPT_ACCUMULATIVE_TIMEOUT	EQU	00000800h
CRYPT_RETRIEVE_AUX_INFO	struct 
cbSize	DWORD	?
pLastSyncTime	DWORD	?
CRYPT_RETRIEVE_AUX_INFO	ends

PCRYPT_RETRIEVE_AUX_INFO typedef ptr CRYPT_RETRIEVE_AUX_INFO

@DefProto WINCRYPT32API, CryptRetrieveObjectByUrlA, stdcall, , <:LPSTR, :LPSTR, :DWORD, :DWORD, :ptr LPVOID, :HCRYPTASYNC, :PCRYPT_CREDENTIALS, :LPVOID, :PCRYPT_RETRIEVE_AUX_INFO>, 36
@DefProto WINCRYPT32API, CryptRetrieveObjectByUrlW, stdcall, , <:LPWSTR, :LPSTR, :DWORD, :DWORD, :ptr LPVOID, :HCRYPTASYNC, :PCRYPT_CREDENTIALS, :LPVOID, :PCRYPT_RETRIEVE_AUX_INFO>, 36
ifdef UNICODE
CryptRetrieveObjectByUrl	EQU	<CryptRetrieveObjectByUrlW>
else 
CryptRetrieveObjectByUrl	EQU	<CryptRetrieveObjectByUrlA>
endif 
proto_PFN_CRYPT_CANCEL_RETRIEVAL typedef proto stdcall :DWORD,:ptr 
PFN_CRYPT_CANCEL_RETRIEVAL typedef ptr proto_PFN_CRYPT_CANCEL_RETRIEVAL
@DefProto WINCRYPT32API, CryptInstallCancelRetrieval, stdcall, , <:PFN_CRYPT_CANCEL_RETRIEVAL, :ptr , :DWORD, :ptr >, 16
@DefProto WINCRYPT32API, CryptUninstallCancelRetrieval, stdcall, , <:DWORD, :ptr >, 8
@DefProto WINCRYPT32API, CryptCancelAsyncRetrieval, stdcall, , <:HCRYPTASYNC>, 4
CRYPT_PARAM_ASYNC_RETRIEVAL_COMPLETION	EQU	1
proto_PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC typedef proto stdcall :LPVOID,:DWORD,:LPSTR,:LPSTR,:LPVOID
PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC typedef ptr proto_PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC
CRYPT_ASYNC_RETRIEVAL_COMPLETION	struct 
pfnCompletion	PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC	?
pvCompletion	LPVOID	?
CRYPT_ASYNC_RETRIEVAL_COMPLETION	ends

PCRYPT_ASYNC_RETRIEVAL_COMPLETION typedef ptr CRYPT_ASYNC_RETRIEVAL_COMPLETION

CRYPT_PARAM_CANCEL_ASYNC_RETRIEVAL	EQU	2
proto_PFN_CANCEL_ASYNC_RETRIEVAL_FUNC typedef proto stdcall :HCRYPTASYNC
PFN_CANCEL_ASYNC_RETRIEVAL_FUNC typedef ptr proto_PFN_CANCEL_ASYNC_RETRIEVAL_FUNC
CRYPT_GET_URL_FROM_PROPERTY	EQU	00000001h
CRYPT_GET_URL_FROM_EXTENSION	EQU	00000002h
CRYPT_GET_URL_FROM_UNAUTH_ATTRIBUTE	EQU	00000004h
CRYPT_GET_URL_FROM_AUTH_ATTRIBUTE	EQU	00000008h
CRYPT_URL_ARRAY	struct 
cUrl	DWORD	?
rgwszUrl	DWORD	?
CRYPT_URL_ARRAY	ends

PCRYPT_URL_ARRAY typedef ptr CRYPT_URL_ARRAY

CRYPT_URL_INFO	struct 
cbSize	DWORD	?
dwSyncDeltaTime	DWORD	?
cGroup	DWORD	?
rgcGroupEntry	DWORD	?
CRYPT_URL_INFO	ends

PCRYPT_URL_INFO typedef ptr CRYPT_URL_INFO

@DefProto WINCRYPT32API, CryptGetObjectUrl, stdcall, , <:LPSTR, :LPVOID, :DWORD, :PCRYPT_URL_ARRAY, :ptr DWORD, :PCRYPT_URL_INFO, :ptr DWORD, :LPVOID>, 32
URL_OID_GET_OBJECT_URL_FUNC	EQU	<"UrlDllGetObjectUrl">
URL_OID_CERTIFICATE_ISSUER	EQU	1
URL_OID_CERTIFICATE_CRL_DIST_POINT	EQU	2
URL_OID_CTL_ISSUER	EQU	3
URL_OID_CTL_NEXT_UPDATE	EQU	4
URL_OID_CRL_ISSUER	EQU	5
URL_OID_CERTIFICATE_FRESHEST_CRL	EQU	6
URL_OID_CRL_FRESHEST_CRL	EQU	7
URL_OID_CROSS_CERT_DIST_POINT	EQU	8
CERT_CRL_CONTEXT_PAIR	struct 
pCertContext	PCCERT_CONTEXT	?
pCrlContext	PCCRL_CONTEXT	?
CERT_CRL_CONTEXT_PAIR	ends

PCERT_CRL_CONTEXT_PAIR typedef ptr CERT_CRL_CONTEXT_PAIR

PCCERT_CRL_CONTEXT_PAIR typedef ptr CERT_CRL_CONTEXT_PAIR
@DefProto WINCRYPT32API, CryptGetTimeValidObject, stdcall, , <:LPSTR, :LPVOID, :PCCERT_CONTEXT, :LPFILETIME, :DWORD, :DWORD, :ptr LPVOID, :PCRYPT_CREDENTIALS, :LPVOID>, 36
TIME_VALID_OID_GET_OBJECT_FUNC	EQU	<"TimeValidDllGetObject">
TIME_VALID_OID_GET_CTL	EQU	1
TIME_VALID_OID_GET_CRL	EQU	2
TIME_VALID_OID_GET_CRL_FROM_CERT	EQU	3
TIME_VALID_OID_GET_FRESHEST_CRL_FROM_CERT	EQU	4
TIME_VALID_OID_GET_FRESHEST_CRL_FROM_CRL	EQU	5
@DefProto WINCRYPT32API, CryptFlushTimeValidObject, stdcall, , <:LPSTR, :LPVOID, :PCCERT_CONTEXT, :DWORD, :LPVOID>, 20
TIME_VALID_OID_FLUSH_OBJECT_FUNC	EQU	<"TimeValidDllFlushObject">
TIME_VALID_OID_FLUSH_CTL	EQU	1
TIME_VALID_OID_FLUSH_CRL	EQU	2
TIME_VALID_OID_FLUSH_CRL_FROM_CERT	EQU	3
TIME_VALID_OID_FLUSH_FRESHEST_CRL_FROM_CERT	EQU	4
TIME_VALID_OID_FLUSH_FRESHEST_CRL_FROM_CRL	EQU	5
CRYPTPROTECT_PROMPTSTRUCT	struct 
cbSize	DWORD	?
dwPromptFlags	DWORD	?
hwndApp	HWND	?
szPrompt	LPWSTR	?
CRYPTPROTECT_PROMPTSTRUCT	ends

PCRYPTPROTECT_PROMPTSTRUCT typedef ptr CRYPTPROTECT_PROMPTSTRUCT

CRYPTPROTECT_DEFAULT_PROVIDER	EQU	<{ 0df9d8cd0h , 1501h , 11d1h , { 8ch , 7ah , 00h , 0c0h , 4fh , 0c2h , 97h , 0ebh } }>
CRYPTPROTECT_PROMPT_ON_UNPROTECT	EQU	1h
CRYPTPROTECT_PROMPT_ON_PROTECT	EQU	2h
CRYPTPROTECT_PROMPT_RESERVED	EQU	04h
CRYPTPROTECT_PROMPT_STRONG	EQU	08h
CRYPTPROTECT_UI_FORBIDDEN	EQU	1h
CRYPTPROTECT_LOCAL_MACHINE	EQU	4h
CRYPTPROTECT_CRED_SYNC	EQU	8h
CRYPTPROTECT_AUDIT	EQU	10h
CRYPTPROTECT_NO_RECOVERY	EQU	20h
CRYPTPROTECT_VERIFY_PROTECTION	EQU	40h
CRYPTPROTECT_CRED_REGENERATE	EQU	80h
CRYPTPROTECT_FIRST_RESERVED_FLAGVAL	EQU	0FFFFFFFh
CRYPTPROTECT_LAST_RESERVED_FLAGVAL	EQU	0FFFFFFFFh
@DefProto WINCRYPT32API, CryptProtectData, stdcall, , <:ptr DATA_BLOB, :LPWSTR, :ptr DATA_BLOB, :PVOID, :ptr CRYPTPROTECT_PROMPTSTRUCT, :DWORD, :ptr DATA_BLOB>, 28
@DefProto WINCRYPT32API, CryptUnprotectData, stdcall, , <:ptr DATA_BLOB, :ptr LPWSTR, :ptr DATA_BLOB, :PVOID, :ptr CRYPTPROTECT_PROMPTSTRUCT, :DWORD, :ptr DATA_BLOB>, 28
@DefProto WINCRYPT32API, CertCreateSelfSignCertificate, stdcall, , <:HCRYPTPROV, :PCERT_NAME_BLOB, :DWORD, :PCRYPT_KEY_PROV_INFO, :PCRYPT_ALGORITHM_IDENTIFIER, :PSYSTEMTIME, :PSYSTEMTIME, :PCERT_EXTENSIONS>, 32
CERT_CREATE_SELFSIGN_NO_SIGN	EQU	1
CERT_CREATE_SELFSIGN_NO_KEY_INFO	EQU	2
@DefProto WINCRYPT32API, CryptGetKeyIdentifierProperty, stdcall, , <:ptr CRYPT_HASH_BLOB, :DWORD, :DWORD, :LPWSTR, :ptr , :ptr , :ptr DWORD>, 28
CRYPT_KEYID_MACHINE_FLAG	EQU	00000020h
CRYPT_KEYID_ALLOC_FLAG	EQU	00008000h
@DefProto WINCRYPT32API, CryptSetKeyIdentifierProperty, stdcall, , <:ptr CRYPT_HASH_BLOB, :DWORD, :DWORD, :LPWSTR, :ptr , :ptr >, 24
CRYPT_KEYID_DELETE_FLAG	EQU	00000010h
CRYPT_KEYID_SET_NEW_FLAG	EQU	00002000h
proto_PFN_CRYPT_ENUM_KEYID_PROP typedef proto stdcall :ptr CRYPT_HASH_BLOB,:DWORD,:ptr ,:ptr ,:DWORD,:ptr DWORD,:ptr ptr ,:ptr DWORD
PFN_CRYPT_ENUM_KEYID_PROP typedef ptr proto_PFN_CRYPT_ENUM_KEYID_PROP
@DefProto WINCRYPT32API, CryptEnumKeyIdentifierProperties, stdcall, , <:ptr CRYPT_HASH_BLOB, :DWORD, :DWORD, :LPWSTR, :ptr , :ptr , :PFN_CRYPT_ENUM_KEYID_PROP>, 28
@DefProto WINCRYPT32API, CryptCreateKeyIdentifierFromCSP, stdcall, , <:DWORD, :LPSTR, :ptr PUBLICKEYSTRUC, :DWORD, :DWORD, :ptr , :ptr BYTE, :ptr DWORD>, 32
HCERTCHAINENGINE typedef HANDLE
HCCE_CURRENT_USER	EQU	<( ( HCERTCHAINENGINE ) NULL )>
HCCE_LOCAL_MACHINE	EQU	( ( HCERTCHAINENGINE ) 1h )
CERT_CHAIN_CACHE_END_CERT	EQU	00000001h
CERT_CHAIN_THREAD_STORE_SYNC	EQU	00000002h
CERT_CHAIN_CACHE_ONLY_URL_RETRIEVAL	EQU	00000004h
CERT_CHAIN_USE_LOCAL_MACHINE_STORE	EQU	00000008h
CERT_CHAIN_ENABLE_CACHE_AUTO_UPDATE	EQU	00000010h
CERT_CHAIN_ENABLE_SHARE_STORE	EQU	00000020h
CERT_CHAIN_ENGINE_CONFIG	struct 
cbSize	DWORD	?
hRestrictedRoot	HCERTSTORE	?
hRestrictedTrust	HCERTSTORE	?
hRestrictedOther	HCERTSTORE	?
cAdditionalStore	DWORD	?
rghAdditionalStore	DWORD	?
dwFlags	DWORD	?
dwUrlRetrievalTimeout	DWORD	?
MaximumCachedCertificates	DWORD	?
CycleDetectionModulus	DWORD	?
CERT_CHAIN_ENGINE_CONFIG	ends

PCERT_CHAIN_ENGINE_CONFIG typedef ptr CERT_CHAIN_ENGINE_CONFIG

@DefProto WINCRYPT32API, CertCreateCertificateChainEngine, stdcall, , <:PCERT_CHAIN_ENGINE_CONFIG, :ptr HCERTCHAINENGINE>, 8
@DefProto WINCRYPT32API, CertFreeCertificateChainEngine, stdcall, , <:HCERTCHAINENGINE>, 4
@DefProto WINCRYPT32API, CertResyncCertificateChainEngine, stdcall, , <:HCERTCHAINENGINE>, 4
CERT_TRUST_STATUS	struct 
dwErrorStatus	DWORD	?
dwInfoStatus	DWORD	?
CERT_TRUST_STATUS	ends

PCERT_TRUST_STATUS typedef ptr CERT_TRUST_STATUS

CERT_TRUST_NO_ERROR	EQU	00000000h
CERT_TRUST_IS_NOT_TIME_VALID	EQU	00000001h
CERT_TRUST_IS_NOT_TIME_NESTED	EQU	00000002h
CERT_TRUST_IS_REVOKED	EQU	00000004h
CERT_TRUST_IS_NOT_SIGNATURE_VALID	EQU	00000008h
CERT_TRUST_IS_NOT_VALID_FOR_USAGE	EQU	00000010h
CERT_TRUST_IS_UNTRUSTED_ROOT	EQU	00000020h
CERT_TRUST_REVOCATION_STATUS_UNKNOWN	EQU	00000040h
CERT_TRUST_IS_CYCLIC	EQU	00000080h
CERT_TRUST_INVALID_EXTENSION	EQU	00000100h
CERT_TRUST_INVALID_POLICY_CONSTRAINTS	EQU	00000200h
CERT_TRUST_INVALID_BASIC_CONSTRAINTS	EQU	00000400h
CERT_TRUST_INVALID_NAME_CONSTRAINTS	EQU	00000800h
CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT	EQU	00001000h
CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT	EQU	00002000h
CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT	EQU	00004000h
CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT	EQU	00008000h
CERT_TRUST_IS_OFFLINE_REVOCATION	EQU	01000000h
CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY	EQU	02000000h
CERT_TRUST_IS_PARTIAL_CHAIN	EQU	00010000h
CERT_TRUST_CTL_IS_NOT_TIME_VALID	EQU	00020000h
CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID	EQU	00040000h
CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE	EQU	00080000h
CERT_TRUST_HAS_EXACT_MATCH_ISSUER	EQU	00000001h
CERT_TRUST_HAS_KEY_MATCH_ISSUER	EQU	00000002h
CERT_TRUST_HAS_NAME_MATCH_ISSUER	EQU	00000004h
CERT_TRUST_IS_SELF_SIGNED	EQU	00000008h
CERT_TRUST_HAS_PREFERRED_ISSUER	EQU	00000100h
CERT_TRUST_HAS_ISSUANCE_CHAIN_POLICY	EQU	00000200h
CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS	EQU	00000400h
CERT_TRUST_IS_COMPLEX_CHAIN	EQU	00010000h
CERT_REVOCATION_INFO	struct 
cbSize	DWORD	?
dwRevocationResult	DWORD	?
pszRevocationOid	LPSTR	?
pvOidSpecificInfo	LPVOID	?
fHasFreshnessTime	BOOL	?
dwFreshnessTime	DWORD	?
pCrlInfo	PCERT_REVOCATION_CRL_INFO	?
CERT_REVOCATION_INFO	ends

PCERT_REVOCATION_INFO typedef ptr CERT_REVOCATION_INFO

CERT_TRUST_LIST_INFO	struct 
cbSize	DWORD	?
pCtlEntry	PCTL_ENTRY	?
pCtlContext	PCCTL_CONTEXT	?
CERT_TRUST_LIST_INFO	ends

PCERT_TRUST_LIST_INFO typedef ptr CERT_TRUST_LIST_INFO

CERT_CHAIN_ELEMENT	struct 
cbSize	DWORD	?
pCertContext	PCCERT_CONTEXT	?
TrustStatus	CERT_TRUST_STATUS	<>
pRevocationInfo	PCERT_REVOCATION_INFO	?
pIssuanceUsage	PCERT_ENHKEY_USAGE	?
pApplicationUsage	PCERT_ENHKEY_USAGE	?
pwszExtendedErrorInfo	LPWSTR	?
CERT_CHAIN_ELEMENT	ends

PCERT_CHAIN_ELEMENT typedef ptr CERT_CHAIN_ELEMENT

CERT_SIMPLE_CHAIN	struct 
cbSize	DWORD	?
TrustStatus	CERT_TRUST_STATUS	<>
cElement	DWORD	?
rgpElement	DWORD	?
pTrustListInfo	PCERT_TRUST_LIST_INFO	?
fHasRevocationFreshnessTime	BOOL	?
dwRevocationFreshnessTime	DWORD	?
CERT_SIMPLE_CHAIN	ends

PCERT_SIMPLE_CHAIN typedef ptr CERT_SIMPLE_CHAIN

;CERT_CHAIN_CONTEXT typedef _CERT_CHAIN_CONTEXT
PCERT_CHAIN_CONTEXT typedef ptr CERT_CHAIN_CONTEXT

PCCERT_CHAIN_CONTEXT typedef ptr CERT_CHAIN_CONTEXT
CERT_CHAIN_CONTEXT	struct 
cbSize	DWORD	?
TrustStatus	CERT_TRUST_STATUS	<>
cChain	DWORD	?
rgpChain	DWORD	?
cLowerQualityChainContext	DWORD	?
rgpLowerQualityChainContext	DWORD	?
fHasRevocationFreshnessTime	BOOL	?
dwRevocationFreshnessTime	DWORD	?
CERT_CHAIN_CONTEXT	ends

USAGE_MATCH_TYPE_AND	EQU	00000000h
USAGE_MATCH_TYPE_OR	EQU	00000001h
CERT_USAGE_MATCH	struct 
dwType	DWORD	?
Usage	CERT_ENHKEY_USAGE	<>
CERT_USAGE_MATCH	ends

PCERT_USAGE_MATCH typedef ptr CERT_USAGE_MATCH

CTL_USAGE_MATCH	struct 
dwType	DWORD	?
Usage	CTL_USAGE	<>
CTL_USAGE_MATCH	ends

PCTL_USAGE_MATCH typedef ptr CTL_USAGE_MATCH

CERT_CHAIN_PARA	struct 
cbSize	DWORD	?
RequestedUsage	CERT_USAGE_MATCH	<>
ifdef CERT_CHAIN_PARA_HAS_EXTRA_FIELDS
RequestedIssuancePolicy	CERT_USAGE_MATCH	<>
dwUrlRetrievalTimeout	DWORD	?
fCheckRevocationFreshnessTime	BOOL	?
dwRevocationFreshnessTime	DWORD	?
endif 
CERT_CHAIN_PARA	ends

PCERT_CHAIN_PARA typedef ptr CERT_CHAIN_PARA

CERT_CHAIN_REVOCATION_CHECK_END_CERT	EQU	10000000h
CERT_CHAIN_REVOCATION_CHECK_CHAIN	EQU	20000000h
CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT	EQU	40000000h
CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY	EQU	80000000h
CERT_CHAIN_REVOCATION_ACCUMULATIVE_TIMEOUT	EQU	08000000h
CERT_CHAIN_DISABLE_PASS1_QUALITY_FILTERING	EQU	00000040h
CERT_CHAIN_RETURN_LOWER_QUALITY_CONTEXTS	EQU	00000080h
CERT_CHAIN_DISABLE_AUTH_ROOT_AUTO_UPDATE	EQU	00000100h
CERT_CHAIN_TIMESTAMP_TIME	EQU	00000200h
@DefProto WINCRYPT32API, CertGetCertificateChain, stdcall, , <:HCERTCHAINENGINE, :PCCERT_CONTEXT, :LPFILETIME, :HCERTSTORE, :PCERT_CHAIN_PARA, :DWORD, :LPVOID, :ptr PCCERT_CHAIN_CONTEXT>, 32
@DefProto WINCRYPT32API, CertFreeCertificateChain, stdcall, , <:PCCERT_CHAIN_CONTEXT>, 4
@DefProto WINCRYPT32API, CertDuplicateCertificateChain, stdcall, , <:PCCERT_CHAIN_CONTEXT>, 4
REVOCATION_OID_CRL_REVOCATION	EQU	1
CRL_REVOCATION_INFO	struct 
pCrlEntry	PCRL_ENTRY	?
pCrlContext	PCCRL_CONTEXT	?
pCrlIssuerChain	PCCERT_CHAIN_CONTEXT	?
CRL_REVOCATION_INFO	ends

PCRL_REVOCATION_INFO typedef ptr CRL_REVOCATION_INFO

@DefProto WINCRYPT32API, CertFindChainInStore, stdcall, , <:HCERTSTORE, :DWORD, :DWORD, :DWORD, :ptr , :PCCERT_CHAIN_CONTEXT>, 24
CERT_CHAIN_FIND_BY_ISSUER	EQU	1
proto_PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK typedef proto stdcall :PCCERT_CONTEXT,:ptr 
PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK typedef ptr proto_PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK
CERT_CHAIN_FIND_ISSUER_PARA	struct 
cbSize	DWORD	?
pszUsageIdentifier	LPSTR	?
dwKeySpec	DWORD	?
dwAcquirePrivateKeyFlags	DWORD	?
cIssuer	DWORD	?
rgIssuer	DWORD	?
pfnFindCallback	PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK	?
pvFindArg	DWORD	?
ifdef CERT_CHAIN_FIND_BY_ISSUER_PARA_HAS_EXTRA_FIELDS
pdwIssuerChainIndex	DWORD	?
pdwIssuerElementIndex	DWORD	?
endif 
CERT_CHAIN_FIND_ISSUER_PARA	ends

PCERT_CHAIN_FIND_ISSUER_PARA typedef ptr CERT_CHAIN_FIND_ISSUER_PARA
CERT_CHAIN_FIND_BY_ISSUER_PARA typedef CERT_CHAIN_FIND_ISSUER_PARA
PCERT_CHAIN_FIND_BY_ISSUER_PARA typedef ptr CERT_CHAIN_FIND_ISSUER_PARA

CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG	EQU	0001h
CERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG	EQU	0002h
CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG	EQU	0004h
CERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG	EQU	0008h
CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG	EQU	4000h
CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG	EQU	8000h
CERT_CHAIN_POLICY_PARA	struct 
cbSize	DWORD	?
dwFlags	DWORD	?
pvExtraPolicyPara	DWORD	?
CERT_CHAIN_POLICY_PARA	ends

PCERT_CHAIN_POLICY_PARA typedef ptr CERT_CHAIN_POLICY_PARA

CERT_CHAIN_POLICY_STATUS	struct 
cbSize	DWORD	?
dwError	DWORD	?
lChainIndex	SDWORD	?
lElementIndex	SDWORD	?
pvExtraPolicyStatus	DWORD	?
CERT_CHAIN_POLICY_STATUS	ends

PCERT_CHAIN_POLICY_STATUS typedef ptr CERT_CHAIN_POLICY_STATUS

CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG	EQU	00000001h
CERT_CHAIN_POLICY_IGNORE_CTL_NOT_TIME_VALID_FLAG	EQU	00000002h
CERT_CHAIN_POLICY_IGNORE_NOT_TIME_NESTED_FLAG	EQU	00000004h
CERT_CHAIN_POLICY_IGNORE_INVALID_BASIC_CONSTRAINTS_FLAG	EQU	00000008h
CERT_CHAIN_POLICY_IGNORE_ALL_NOT_TIME_VALID_FLAGS	EQU	( CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG  or  CERT_CHAIN_POLICY_IGNORE_CTL_NOT_TIME_VALID_FLAG  or  CERT_CHAIN_POLICY_IGNORE_NOT_TIME_NESTED_FLAG )
CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG	EQU	00000010h
CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG	EQU	00000020h
CERT_CHAIN_POLICY_IGNORE_INVALID_NAME_FLAG	EQU	00000040h
CERT_CHAIN_POLICY_IGNORE_INVALID_POLICY_FLAG	EQU	00000080h
CERT_CHAIN_POLICY_IGNORE_END_REV_UNKNOWN_FLAG	EQU	00000100h
CERT_CHAIN_POLICY_IGNORE_CTL_SIGNER_REV_UNKNOWN_FLAG	EQU	00000200h
CERT_CHAIN_POLICY_IGNORE_CA_REV_UNKNOWN_FLAG	EQU	00000400h
CERT_CHAIN_POLICY_IGNORE_ROOT_REV_UNKNOWN_FLAG	EQU	00000800h
CERT_CHAIN_POLICY_IGNORE_ALL_REV_UNKNOWN_FLAGS	EQU	( CERT_CHAIN_POLICY_IGNORE_END_REV_UNKNOWN_FLAG  or  CERT_CHAIN_POLICY_IGNORE_CTL_SIGNER_REV_UNKNOWN_FLAG  or  CERT_CHAIN_POLICY_IGNORE_CA_REV_UNKNOWN_FLAG  or  CERT_CHAIN_POLICY_IGNORE_ROOT_REV_UNKNOWN_FLAG )
CERT_CHAIN_POLICY_ALLOW_TESTROOT_FLAG	EQU	00008000h
CERT_CHAIN_POLICY_TRUST_TESTROOT_FLAG	EQU	00004000h
@DefProto WINCRYPT32API, CertVerifyCertificateChainPolicy, stdcall, , <:LPSTR, :PCCERT_CHAIN_CONTEXT, :PCERT_CHAIN_POLICY_PARA, :PCERT_CHAIN_POLICY_STATUS>, 16
CRYPT_OID_VERIFY_CERTIFICATE_CHAIN_POLICY_FUNC	EQU	<"CertDllVerifyCertificateChainPolicy">
CERT_CHAIN_POLICY_BASE	EQU	1
CERT_CHAIN_POLICY_AUTHENTICODE	EQU	2
CERT_CHAIN_POLICY_AUTHENTICODE_TS	EQU	3
CERT_CHAIN_POLICY_SSL	EQU	4
CERT_CHAIN_POLICY_BASIC_CONSTRAINTS	EQU	5
CERT_CHAIN_POLICY_NT_AUTH	EQU	6
CERT_CHAIN_POLICY_MICROSOFT_ROOT	EQU	7
AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA	struct 
cbSize	DWORD	?
dwRegPolicySettings	DWORD	?
pSignerInfo	PCMSG_SIGNER_INFO	?
AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA	ends

PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA typedef ptr AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA

AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS	struct 
cbSize	DWORD	?
fCommercial	BOOL	?
AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS	ends

PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS typedef ptr AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS

AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA	struct 
cbSize	DWORD	?
dwRegPolicySettings	DWORD	?
fCommercial	BOOL	?
AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA	ends

PAUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA typedef ptr AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA

HTTPSPolicyCallbackData	struct 
union
cbStruct	DWORD	?
cbSize	DWORD	?
ends
dwAuthType	DWORD	?
AUTHTYPE_CLIENT	EQU	1
AUTHTYPE_SERVER	EQU	2
fdwChecks	DWORD	?
pwszServerName	DWORD	?
HTTPSPolicyCallbackData	ends

PHTTPSPolicyCallbackData typedef ptr HTTPSPolicyCallbackData
SSL_EXTRA_CERT_CHAIN_POLICY_PARA typedef HTTPSPolicyCallbackData
PSSL_EXTRA_CERT_CHAIN_POLICY_PARA typedef ptr HTTPSPolicyCallbackData

BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_CA_FLAG	EQU	80000000h
BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_END_ENTITY_FLAG	EQU	40000000h
@DefProto WINCRYPT32STRINGAPI, CryptStringToBinaryA, stdcall, , <:LPSTR, :DWORD, :DWORD, :ptr BYTE, :ptr DWORD, :ptr DWORD, :ptr DWORD>, 28
@DefProto WINCRYPT32STRINGAPI, CryptStringToBinaryW, stdcall, , <:LPWSTR, :DWORD, :DWORD, :ptr BYTE, :ptr DWORD, :ptr DWORD, :ptr DWORD>, 28
ifdef UNICODE
CryptStringToBinary	EQU	<CryptStringToBinaryW>
else 
CryptStringToBinary	EQU	<CryptStringToBinaryA>
endif 
@DefProto WINCRYPT32STRINGAPI, CryptBinaryToStringA, stdcall, , <:ptr BYTE, :DWORD, :DWORD, :LPSTR, :ptr DWORD>, 20
@DefProto WINCRYPT32STRINGAPI, CryptBinaryToStringW, stdcall, , <:ptr BYTE, :DWORD, :DWORD, :LPWSTR, :ptr DWORD>, 20
ifdef UNICODE
CryptBinaryToString	EQU	<CryptBinaryToStringW>
else 
CryptBinaryToString	EQU	<CryptBinaryToStringA>
endif 
CRYPT_STRING_BASE64HEADER	EQU	00000000h
CRYPT_STRING_BASE64	EQU	00000001h
CRYPT_STRING_BINARY	EQU	00000002h
CRYPT_STRING_BASE64REQUESTHEADER	EQU	00000003h
CRYPT_STRING_HEX	EQU	00000004h
CRYPT_STRING_HEXASCII	EQU	00000005h
CRYPT_STRING_BASE64_ANY	EQU	00000006h
CRYPT_STRING_ANY	EQU	00000007h
CRYPT_STRING_HEX_ANY	EQU	00000008h
CRYPT_STRING_BASE64X509CRLHEADER	EQU	00000009h
CRYPT_STRING_HEXADDR	EQU	0000000ah
CRYPT_STRING_HEXASCIIADDR	EQU	0000000bh
CRYPT_STRING_NOCR	EQU	80000000h
@DefProto WINCRYPT32API, PFXImportCertStore, stdcall, , <:ptr CRYPT_DATA_BLOB, :LPWSTR, :DWORD>, 12
CRYPT_USER_KEYSET	EQU	00001000h
PKCS12_IMPORT_RESERVED_MASK	EQU	0ffff0000h
@DefProto WINCRYPT32API, PFXIsPFXBlob, stdcall, , <:ptr CRYPT_DATA_BLOB>, 4
@DefProto WINCRYPT32API, PFXVerifyPassword, stdcall, , <:ptr CRYPT_DATA_BLOB, :LPWSTR, :DWORD>, 12
@DefProto WINCRYPT32API, PFXExportCertStoreEx, stdcall, , <:HCERTSTORE, :ptr CRYPT_DATA_BLOB, :LPWSTR, :ptr , :DWORD>, 20
REPORT_NO_PRIVATE_KEY	EQU	0001h
REPORT_NOT_ABLE_TO_EXPORT_PRIVATE_KEY	EQU	0002h
EXPORT_PRIVATE_KEYS	EQU	0004h
PKCS12_EXPORT_RESERVED_MASK	EQU	0ffff0000h
@DefProto WINCRYPT32API, PFXExportCertStore, stdcall, , <:HCERTSTORE, :ptr CRYPT_DATA_BLOB, :LPWSTR, :DWORD>, 16
ifdef __cplusplus
;}
endif 
if defined(_MSC_VER)
if (_MSC_VER ge 800)
if _MSC_VER ge 1200
;#pragma warning ( pop ) 
else 
;#pragma warning ( default : 4201 ) 
endif 
endif 
endif 
endif 

;--- errors: 0
;--- end of file ---
